|
From: | anil |
Subject: | Re: [Linphone-developers] App is crashing on SDK version 5.4.0 <> iOS version |
Date: | Sat, 6 Jul 2024 08:29:49 +0000 |
Hello Support, Can you please help us in the asked questions as we emailed on July 02, 2024. Thanks, Anil From: anil@mobulous.com <anil@mobulous.com> Hello Support, We are using the SDK version 5.4.0 for the Linephone i.e. 5.4.0-alpha.236+02c3fff7 , but the app is crashing when it is in background using VOIP Push. We saw on your blogs that this has been a issue raised by some developers. Here is the code which is written using Objective C for the same, it would be great if you can help us asap on the resolution for this. We have tried using multiple methods and available documentation online but we were not able to find a solution for the same. (void)setupPushKit { PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; pushRegistry.delegate = self; pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP]; } #pragma mark - PKPushRegistryDelegate - (void)pushRegistry:(PKPushRegistry )registry didUpdatePushCredentials:(PKPushCredentials )pushCredentials forType:(PKPushType)type { NSString *deviceToken = [pushCredentials.token description]; dispatch_async(dispatch_get_main_queue(), ^{ linphone_core_did_register_for_remote_push(LC, (__bridge void*)pushCredentials.token); NSUserDefaults *myuserdefaults = [NSUserDefaults standardUserDefaults]; [myuserdefaults setObject:deviceToken forKey:@"deviceToken"]; }); NSLog(@"VoIP Token: %@", deviceToken); } - (void)pushRegistry:(PKPushRegistry *)registry didInvalidatePushTokenForType:(PKPushType)type { NSLog(@"VoIP Token invalidated"); } - (void)pushRegistry:(PKPushRegistry )registry didReceiveIncomingPushWithPayload:(PKPushPayload )payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion { [LinphoneManager.instance launchLinphoneCore]; [LinphoneManager.instance startLinphoneCore]; linphone_core_refresh_registers(LC); } Thanks, Anil |
[Prev in Thread] | Current Thread | [Next in Thread] |