Created
October 30, 2014 01:18
-
-
Save yat1ma30/b4608321d4b3a5875e2d to your computer and use it in GitHub Desktop.
Swiftのapplication openURLでハマるの巻 ref: http://qiita.com/ottati/items/c237c75b3141dbec2164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(application: UIApplication!, openURL url: NSURL, sourceApplication: String, annotation: AnyObject?) -> Bool { | |
return true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func openButton(sender: AnyObject) { | |
let strUrl = "test://" | |
let url = NSURL(string: strUrl) | |
self.extensionContext?.openURL(url, completionHandler: nil) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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