Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

application: continueUserActivity: restorationHandler: not called in iOS 11

I have a Voip app with callkit integrated. It worked fine in iOS 10 and now I seem to have issues with iOS 11 when calling from native recents (iOS recents).

- (BOOL)application:(UIApplication *)application willContinueUserActivityWithType:(nonnull NSString *)userActivityType {}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray * _Nullable))restorationHandler {}

Both these methods are not called and hence I am not able to process the NSUserActivity INStartAudioCallIntent. Am I missing something obvious that has changed in iOS 11?

Thanks in advance.

like image 515
Neelesh Avatar asked Dec 18 '22 04:12

Neelesh


1 Answers

Verify the remoteHandle and supportedHandleTypes, both should be similar as per your requirement.

    callUpdate.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:[NSString stringWithFormat:@"%@", phoneno]];

    configuration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], nil];

If the handles mismatches, you can't able to process the NSUserActivity.

like image 78
RJV Kumar Avatar answered Dec 24 '22 02:12

RJV Kumar