开发者

URL scheme reference for the Keynote iPad app?

开发者 https://www.devze.com 2023-03-11 21:14 出处:网络
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 th

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

精彩评论

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