GetuiLaboratory / getui-flutter-plugin

个推官方提供的推送SDK Flutter 插件(支持 Android & iOS)

Home Page:http://docs.getui.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在 xcode 11.2 中, 使用 个推,iOS应用无法启动

Hongyu-Zhuo opened this issue · comments

在 Flutter 中使用 个推,应用无法启动,报错如下:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'PushKit apps that use VoIP push must link either CallKit or IncomingCallNotifications frameworks.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23c4f02e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50b97b20 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff23c4eda8 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x00007fff256c9b61 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
	4   PushKit                             0x00007fff2afe296f +[PKPushRegistry _checkIfNecessaryVoIPFrameworksAreLinked] + 251
	5   PushKit                             0x00007fff2afe2cdc -[PKPushRegistry _registerForPushType:] + 287
	6   PushKit                             0x00007fff2afe375f __38-[PKPushRegistry setDesiredPushTypes:]_block_invoke + 240
	7   libdispatch.dylib                   0x00000001077e9d48 _dispatch_client_callout + 8
	8   libdispatch.dylib                   0x00000001077f89bf _dispatch_lane_barrier_sync_invoke_and_complete + 132
	9   PushKit                             0x00007fff2afe364e -[PKPushRegistry setDesiredPushTypes:] + 108
	10  Runner                              0x00000001051e5554 -[GetuiflutPlugin voipRegistration] + 180
	11  Runner                              0x00000001051e469c -[GetuiflutPlugin startSdk:result:] + 396
	12  Runner                              0x00000001051e4055 -[GetuiflutPlugin handleMethodCall:result:] + 469
	13  Flutter                             0x00000001058064fd __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
	14  Flutter                             0x000000010579fec0 _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166
	15  Flutter                             0x00000001057a3780 _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38
	16  Flutter                             0x0000000105800db3 _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_31NS_9allocatorIS8_EEFvvEEclEv + 57
	17  Flutter                             0x00000001057b23f1 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 123
	18  Flutter                             0x00000001057b7742 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
	19  CoreFoundation                      0x00007fff23bb2944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
	20  CoreFoundation                      0x00007fff23bb2632 __CFRunLoopDoTimer + 1026
	21  CoreFoundation                      0x00007fff23bb1c8a __CFRunLoopDoTimers + 266
	22  CoreFoundation                      0x00007fff23bac9fe __CFRunLoopRun + 2238
	23  CoreFoundation                      0x00007fff23babe16 CFRunLoopRunSpecific + 438
	24  GraphicsServices                    0x00007fff38438bb0 GSEventRunModal + 65
	25  UIKitCore                           0x00007fff4784fb68 UIApplicationMain + 1621
	26  Runner                              0x00000001051bdb70 main + 112
	27  libdyld.dylib                       0x00007fff51a1dc25 start + 1
	28  ???                                 0x0000000000000001 0x0 + 1
)

我的环境:

[✓] Flutter (Channel unknown, v1.8.3, on Mac OS X 10.14.4 18E194d, locale zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
[✓] Android Studio (version 3.2)
[!] IntelliJ IDEA Ultimate Edition (version 2018.2.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)

如果我不调用 initGetuiSdk();Getuiflut().startSdk()就不会报错,这是什么原因?并且应该 和flutter 版本无关, 我尝试了flutter最新版本也同样报错

加上callkit这个库就可以了

加上callkit这个库就可以了

好的,解决了,谢谢

加上callkit这个库就可以了

但是有 callkit 无法在**区上架