Skip to content

Seeing _terminateAppIfThereAreUnhandledVoipPushes errors in iOS crash logs #163

@rcidt

Description

@rcidt

Bug report

  • I've checked the example to reproduce the issue.

Description

Some users in production are reporting their calls stop arriving after a few days. They fix this by uninstalling/reinstalling the app.

I believe this is being caused by app not handling VoIP Push Notifications on time. According to Apple, failing to handle VoIP Push Notifications repeatedly could cause iOS to completely ignore future VoIP Push Notification.

Repeatedly failing to report calls may prevent your app from receiving any more incoming call notifications.

Here is our code:

// Handle incoming pushes
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
    // Process the received push
    [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
    NSString *uuid = [[NSUUID UUID] UUIDString].lowercaseString;
    NSString *callerName = [payload.dictionaryPayload valueForKeyPath:@"custom.a.ani"];
    [RNCallKeep reportNewIncomingCall:uuid handle:callerName handleType:@"number" hasVideo:false localizedCallerName:@"" fromPushKit:YES];
    completion();
}

Versions

- Callkeep: 3.0.8
- React Native: 0.61.3

Logs

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions