应用程序:continueUserActivity:restorationHandler:未在 iOS 11 中调用

application: continueUserActivity: restorationHandler: not called in iOS 11

我有一个集成了 callkit 的 Voip 应用程序。它在 iOS 10 中运行良好,现在我似乎在从本机最近通话时遇到 iOS 11 问题(iOS 最近通话)。

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

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

这两种方法都没有被调用,因此我无法处理 NSUserActivity INStartAudioCallIntent。我是否遗漏了 iOS 11 中明显发生变化的内容?

提前致谢。

验证 remoteHandle 和 supportedHandleTypes,两者应该与您的要求相似。

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

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

如果句柄不匹配,您将无法处理 NSUserActivity。