URL scheme reference for the Keynote iPad app?
I'm trying to launch the Keynote app from the application that I'm building. How can I know the URL s开发者_如何学运维cheme supported by Keynote (if any) ?
In iTunes, sync apps, then go to apps in the navigation bar, Ctrl-click Keynote, show in Finder, copy it over to the desktop, change it's name to end with .zip, unzip it, open the payload folder, Ctrl-click Keynote.app, select Show Package Contents and view its Info.plist. :)
In Swift 3
let keynoteUrl = URL(string: "x-keynote-live://")
if UIApplication.shared.canOpenURL(keynoteUrl! as URL)
{
UIApplication.shared.open(keynoteUrl!)
}
In Objective-C
NSURL *keynoteUrl = [NSURL URLWithString:@"x-keynote-live://"];
if ([[UIApplication sharedApplication] canOpenURL:keynoteUrl]) {
[[UIApplication sharedApplication] openURL:keynoteUrl];
}
精彩评论