开发者

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];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜