Browse Source

[fix]还原ios推送初始化流程

zk 3 months ago
parent
commit
090237a90e
1 changed files with 2 additions and 3 deletions
  1. 2 3
      lib/main.dart

+ 2 - 3
lib/main.dart

@@ -44,14 +44,13 @@ void main() {
     //隐私相关:系统参数&第三方sdk初始化
     await PrivacyCompliance.ensurePolicyGranted(AppInitTask());
 
+    runApp(const MyApp());
+
     ///实现推送
     if (Platform.isIOS) {
-      // ⚠️ 必须在 runApp 前
       initPushNotification();
     }
 
-    runApp(const MyApp());
-
     //檢查地址
     checkEnv();
   });