fix: 修复 Notification 授权在 iOS 上自动触发的 BUG。

dev
胡宇飞 2024-07-26 11:53:21 +08:00
parent 4721e027b2
commit 1e59e5efa6
2 changed files with 3 additions and 0 deletions

View File

@ -278,6 +278,8 @@ namespace Guru
/// <param name="callback"></param>
public static void RequestNotificationPermission(Action<string> callback = null)
{
FirebaseUtil.StartFetchFcmToken();
UnityEngine.Debug.Log($"[SDK] ---- RequestNotificationPermission");
NotificationService.RequestPermission(status =>
{

View File

@ -148,6 +148,7 @@ namespace Guru
_isDebugEnabled = config.DebugMode;
if (config.EnableDebugLogEvent) Analytics.EnableDebugAnalytics = true; // 允许 Debug 模式下打点
if (!config.AutoNotificationPermission) FirebaseUtil.SetAutoFetchFcmToken(false); // 不允许自动启动获取 FCM Token
InitUpdaters(); // Updaters
InitThreadHandler(); // 初始化线程处理器