5

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!

Anton Chuiko
  • 235
  • 2
  • 10
  • I have the same problem, opened a DTS ticket and still no solution after a couple weeks of investigation :( – Rafael Nobre Feb 22 '17 at 20:33
  • SAME HERE! With exactly the same code, hand off works from iOS to MacOS, but I cannot get handoff to work from MacOS to iOS. This must be an Apple's bug since you guys have the same issues. Surprised to find this here. – coolcool1994 Jun 22 '18 at 16:50

1 Answers1

0

I submitted a bug report with ID: 41374510 with title: Handoff doesn't work from MacOS to iOS.

I tested it with the same code in reverse from iOS to MacOS and that worked great so I am assuming that it is a Apple's bug.

coolcool1994
  • 3,704
  • 4
  • 39
  • 43
  • 1
    I received a reply from Apple who says there is no bug. -> Hi, We have been unable to reproduce this issue with the provided instructions. We have built an iOS and macOS application and can handoff Mac -> Mac, iOS -> iOS, iOS -> Mac, and Mac -> iOS. For us to diagnose the specific issue you are seeing we will need a sysdiagnose from both devices you are testing on. Can you please follow the steps below to collect the logs we need. Note, Handoff no longer works from the Lock screen on iOS, the testing needs to be done from the iPad dock or the iPhone App Switcher. – coolcool1994 Jul 11 '18 at 02:06
  • @coocool1994, Thanks, `App Switcher` makes the difference! – olha Apr 03 '20 at 15:01