-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS app killed after receiving PKPushTypeVoIP notification #162
Comments
P.S Callkeep works perfectly when the app is in foreground, this issue occurs when the app is in background/terminated state |
Hi, I remember I had the same issue. The problem in my case was (if i remember correctly), that the initialisation of callkeep was not called. It has to be called relatively early in the startup phase of the app. I believe the process was shut down before the callkeep.setup was called, as iOS is requiring to react quickly (that is leading to the 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.' log entry which basically just says the OS is shutting down the app now. ). Maybe that helps. |
Hey @janhelwich, thanks for helping out! I followed the temporary solution mentioned here by directing the Callkeep package to use the code from the forked repo and this fixed the issue, now the notification is received and the call is displayed as expected! However, this solution or a better fix for this issue has yet to be added into the package repo so for anyone facing this issue just use the mentioned solution for now |
This is definitely an annoying bug since PushKit is a native way to wake up an app. |
Hey!
I am trying to wake my application through a APNs VoIP notification to display an incoming WebRTC call however I just keep getting this error after receiving a voip notification:
Runner [42337:3797235] didReceiveIncomingPushWithPayloadpayload=PKPushTypeVoIP
Runner [42337:3707235] Do not use the 'alert' format for push type PKPushTypeVOIP.
Runner [42337:3707235] Apps receving VoIP pushes must post an incoming call via Callkit in the same run loop as pushRegistry:didReceiveIncomingPushWithPayload:forType:[withCompletionHandler:]withoutdelay.
Runner [42337:3707235] *** Assertion failure in -[PKPushRegistry _terminateAppIfThereAreUnhandledVoIPPushes], PKPushRegistry.m: 349
Runner [42337:37872351 *** Terminating app due to uncaught exception "NSInternalInconsistencyException', reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.'
Current flow of the application:
For callkeep setup im using the following code:
callKeep.setup(
_navigationService.router.navigatorKey.currentContext,
<String, dynamic>{
'ios': {
'appName': 'AppName',
},
'android': {
'alertTitle': 'Permissions required',
'alertDescription':
'This application needs to access your phone accounts',
'cancelButton': 'Cancel',
'okButton': 'ok',
'foregroundService': {
'channelId': 'com.company.my',
'channelName': 'Foreground service for my app',
'notificationTitle': 'My app is running on background',
'notificationIcon': 'Path to the resource icon of the notification',
},
},
},
backgroundMode: true,
);
Are there any additional steps required for acheiving background/terminated callkit call display using Callkeep package, any help would be much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: