Ant*_*iko 5 macos xcode objective-c ios handoff
我正在实施 iOS 和 Mac 应用程序。我在两个应用程序中都实现了 Hand Off 功能。当我测试实现时,它在以下情况下运行良好:
但是当我在 Mac 应用程序上启动并想在 iOS 应用程序上继续时它不起作用。从逻辑上讲,问题是当我在 Mac 应用程序上创建 userActivity 并成为 Current 时。但是iOS和Mac的代码是一样的,所以不知道问题出在哪里。
// Create userActivity
_userActivity = [[NSUserActivity alloc] initWithActivityType:@"com.myapp.image"];
_userActivity.title = @"Image";
_userActivity.supportsContinuationStreams = YES;
_userActivity.delegate = self;
_userActivity.userInfo = @{
@"Key" : @"information from the other device",
@"URL" : @"http://www.apple.com"
};
[_userActivity becomeCurrent];
Run Code Online (Sandbox Code Playgroud)
谢谢!
我提交了一份错误报告,ID:41374510,标题:Handoff does not work from MacOS to iOS。
我用相同的代码从 iOS 反向测试到 MacOS,效果很好,所以我假设这是 Apple 的错误。