1

I have a situation where i have to use some keynote files in my app and for this i have to use Keynote app.

Now my question is that is there any method to open the keynote app from my app (might be from URL scheme). If yes then how to pass my file to that.

Is there any alternative to this i have never used Keynote that is why i have very less knowledge about it.

Please help.

sajwan
  • 333
  • 3
  • 14

2 Answers2

2

There is no official mention of a URL scheme reference for the Keynote iOS app. If you want to try using Keynote files, I suggest you look at UIDocumentInteractionController. If there is an app that can open those files, it will provide the user options to open it.

Deepak Danduprolu
  • 44,595
  • 12
  • 101
  • 105
  • 1
    I'm using UIDocumentInteractionController — firstly, the .key document is previewed, then I tap "open with", choose Keynote, but the app won't start. What could be an issue? – Solomiya Mar 24 '15 at 12:50
1

You cannot open a file directly in Keynote from your app by passing it. But you can open Keynote from your app.

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];
}
Jay Mehta
  • 1,511
  • 15
  • 20