iOS8 Handoff - Example project - ios8

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.

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];
Sources : https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/Handoff/HandoffProgrammingGuide.pdf

Related

Facebook SDK for iOS Xcode?

I need help adding this code from Facebook to enable advertiser tracking. Here is a link to the description. I do not know where to place the code in Xcode’s source code. Can someone help me?
The link below has the code.
https://developers.facebook.com/docs/setting-up/platform-setup/ios/SKAdNetwork
enter image description here
The guide that you linked says:
Add the following SKAdNetwork IDs to your Xcode project’s Info.plist
So, add them! Note that the example is in XML form, but the Info.plist is displayed visually. You need to Right-Click -> Open As -> Source Code.
Then just paste them in.
<key>SKAdNetworkItems</key> /// make sure you also add this line
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n38lu8286q.skadnetwork</string>
</dict>
</array>
The example doesn't include <key>SKAdNetworkItems</key>, but you need to add this (check out the For more information section)

Rox Xamarin Video 2.1.0 issue

I'm working with Rox Xamarin Video 2.1.0. in xamarin forms
there is url here
I tried to make video view like sample project. but it is not woking.
sample project is working well, but my project is not working.
You need to provide settings in info.plist.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourDomainName.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>

IOS Ad Hoc distribution link does nothing

Trying to create a distribution for testing. When the link is clicked in safari on the ios device nothing happens (literally. No errors). We are using an enterprise cert and a universal distribution profile. The mime types are correct and everything worked great until we moved to a new folder on the web server. Please help. If there's a way to see what the error is in safari that would be a good start.
Here's the relevant code.
html
<html>
<head>
<title>
test
</title>
</head>
<body>
<center>
<h1>Test</h1>
<a href=itms-services://?action=download-manifest&url=http://uri/app.plist>Install</a>
</center>
</body>
</html>
plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://uri/app.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>appId</string>
<key>bundle-version</key>
<string>1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>apptitle</string>
</dict>
</dict>
</array>
</dict>
</plist>
edit
wiping the iPad in question seems to work, but this isn't really a viable solution if it happens to a personal device. Any other possible solutions?
I had the same problem on iOS8. The install button would automatically disable in Safari. The cause was that my plist file was invalid. That seems odd at first but apparently Safari checks the link out before you even click it. I grabbed a copy of the plist file from a previous build and (after updating the app version number) it worked. It's also worth noting that Xcode 6 doesn't generate plist files like the older versions did. For more info on Xcode 6/plist you can check out this link as well:
Xcode 6 Save for Enterprise Deployment does not create plist for ipa anymore?
I was having this issue and rebuild and archiving with Xcode 4.6.2 (released April 15) has resolved it for me.

xcode template change framework path

Is it possible in the templateInfo.plist to change where a framework is loaded from?
I can't seem to find how to change it with the framework also being installed to the iPhoneOS#.#SDK and iPhoneSimulatorOS#.#SDK System/Library/Frameworks directories.
I have my framework loading from those directories where it is installed but I have a request to change the template to load the framework from another install location to minimize disk space.
Example plist xml:
<key>Frameworks</key>
<array>
<string>MobileCoreServices</string>
<string>My_New_SDK</string>
<string>AddressBook</string>
<string>AddressBookUI</string>
<string>AudioToolbox</string>
<string>AVFoundation</string>
<string>CFNetwork</string>
<string>CoreGraphics</string>
<string>CoreLocation</string>
<string>CoreTelephony</string>
<string>ExternalAccessory</string>
<string>Foundation</string>
<string>MapKit</string>
<string>MessageUI</string>
<string>MediaPlayer</string>
<string>Security</string>
<string>SystemConfiguration</string>
<string>QuartzCore</string>
<string>UIKit</string>
</array>
If you remove the My_New_SDK from the frameworks list of the target area of the template, you can create a Node in the template for the framework and specify the absolute path in that node. Do not forget to add the node to the Nodes array in the template plist
<key>MY_New_SDK.framework</key>
<dict>
<key>Path</key>
<string>/PATH_TO_FRAMEWORK/My_New_SDK.framework</string>
<key>PathType</key>
<string>Absolute</string>
</dict>

Save documents as folders, like Pages, Numbers, etc

What's the right way to go about saving data like Pages, Numbers and other OSX applications do? That is, it looks like a file to the user, but is in fact a directory (a bundle?) containing a variety of stuff. I have some fairly complex data that I'd like to store in the same way; in particular, some sensor data that needs to be associated with video files.
The Apple official docs on the topic are probably a good starting point.
From the Pages Info.plist file:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pages</string>
</array>
[...]
<key>LSTypeIsPackage</key>
<true/>
[...]
</dict>
</array>
seem to be what does the trick.
It also looks like NSFileWrapper may be part of the answer:
Document-Based Applications Overview FAQ.

Resources