From 4bae1d1e9838c6d7f388a585041474b7784ccd4d Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 9 Jul 2025 11:23:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:ios=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=89=93?= =?UTF-8?q?=E5=BC=80=E5=BA=94=E7=94=A8=E6=97=B6=E8=8E=B7=E5=8F=96VoIPToken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index e49ab97e..3953f687 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -66,12 +66,13 @@ FutureOr main() async { // runApp(MultiProvider(providers: [ // ChangeNotifierProvider(create: (_) => DebugInfoModel()), // ], child: MyApp(isLogin: isLogin))); - CallKitHandler.setupListener(); - String? token = await CallKitHandler.getVoipToken(); - print('获取到的VoIP Token: $token'); + if (Platform.isIOS) { + CallKitHandler.setupListener(); + String? token = await CallKitHandler.getVoipToken(); + print('获取到的VoIP Token: $token'); + } + runApp(MyApp(isLogin: isLogin)); - }, onException: (FlutterErrorDetails details) async { - debugPrint('FlutterErrorDetails ${details.exceptionAsString()}'); }); if (AppPlatform.isAndroid) {