Skip to content

Instantly share code, notes, and snippets.

@yat1ma30
Created October 30, 2014 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yat1ma30/b4608321d4b3a5875e2d to your computer and use it in GitHub Desktop.
Save yat1ma30/b4608321d4b3a5875e2d to your computer and use it in GitHub Desktop.
Swiftのapplication openURLでハマるの巻 ref: http://qiita.com/ottati/items/c237c75b3141dbec2164
func application(application: UIApplication!, openURL url: NSURL, sourceApplication: String, annotation: AnyObject?) -> Bool {
return true
}
@IBAction func openButton(sender: AnyObject) {
let strUrl = "test://"
let url = NSURL(string: strUrl)
self.extensionContext?.openURL(url, completionHandler: nil)
}
func application(application: UIApplication!, openURL url: NSURL, sourceApplication: String!, annotation: AnyObject?) -> Bool {
println(sourceApplication) // nil
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment