IOS8 Handoff - sample project

After watching the WWDC video, I really want to accept handover in one of my applications, the concept looks easy, but the handover does not appear on my other devices, another Apple transfer works. I assume that my problem is with the entries in my info.plist file, are there any demo projects that show how to implement the handover? I searched and found nothing.

+4
source share
1 answer

According to the documentation, the plist for a document-based application 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 application:

<key>NSUserActivityTypes</key>
<array>
    <string>com.myCompany.myBrowser.browsing</string>
</array>

And the implementation is this:

NSUserActivity* myActivity = [[NSUserActivity alloc]
    initWithActivityType: @"com.myCompany.myBrowser.browsing"];
myActivity.userInfo = @{ ... };
myActivity.title = @"Browsing";
[myActivity becomeCurrent];

: https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/Handoff/HandoffProgrammingGuide.pdf

+2

All Articles