I would like to communicate between two Apps installed on the same phone. In order to do this, I read many official documents to understand that I have to implement a Custom URL Scheme.
Before iOS 9, it seems that we have to add a URLType in Info and define the URL Scheme : " ".
But after the iOS 9, it change the way to communicate between Apps.
The url scheme example is discussed in: Querying URL Schemes with canOpenURL.
My App A code below:
@IBAction func sender(sender: AnyObject) {
let ourapplication : UIApplication = UIApplication.sharedApplication()
let ourpath : String = "iOSTest://"
//.stringByAppendingString(urlEncodedText)
let oururl : NSURL = NSURL(string: ourpath)!
ourapplication.canOpenURL(oururl)
}
At My App B, I add a url name iOSTest in Info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>iOSTest</string>
</array>
When I install the two App on my iPhone to test, it doesn't work at all.
Here is my error!
What's wrong with my App?