소스 검색

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

zk 11 달 전
부모
커밋
090237a90e
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  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();
   });