Having watched the WWDC video I'm keen to adopt handoff in one of my apps, the concept looks easy but the handoff's are not appearing on my other devices, other Apple handoff's are working. I'm guessing my problem relates to the entries in my info.plist file, are there any demo projects that show how to implement handoff? I've searched and failed to find anything.
Asked
Active
Viewed 1,630 times
4
-
https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals/HandoffFundamentals.html – Hemang Sep 12 '14 at 09:20
1 Answers
2
According to the documentation the plist for a document based app should look like this :
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>NSRTFDPboardType</string>
. . .
<key>LSItemContentTypes</key>
<array>
<string>com.myCompany.rtfd</string>
</array>
. . .
<key>NSUbiquitousDocumentUserActivityType</key>
<string>com.myCompany.myBrowser.browsing</string>
</dict>
</array>
and for a non-document based app:
<key>NSUserActivityTypes</key>
<array>
<string>com.myCompany.myBrowser.browsing</string>
</array>
And the implementation like this :
NSUserActivity* myActivity = [[NSUserActivity alloc]
initWithActivityType: @"com.myCompany.myBrowser.browsing"];
myActivity.userInfo = @{ ... };
myActivity.title = @"Browsing";
[myActivity becomeCurrent];

ccjensen
- 4,578
- 2
- 23
- 25

Nicolas Charvoz
- 1,509
- 15
- 41
-
Is those coding really enough to make handoff work? Has someone actually make it this way? – Solomiya Nov 01 '15 at 21:56