I am implementing both iOS and Mac applications. I implemented Hand Off feature in both applications. When I test implementation it works well when:
- start on iOS app and continue on iOS app
- start on iOS app and continue on Mac app
But it doesn't work when I start on Mac app and want to continue on iOS app. Logically, the problem is when I create userActivity and becomeCurrent on Mac app. But the code for iOS and Mac is the same, so I don't know where the problem is.
// 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];
Thanks!