开发者

how to open a file in iWork in the iPad

开发者 https://www.devze.com 2023-01-05 02:55 出处:网络
From what I understand, UIApplication -openFile can open files externally, the application depending on the URL scheme.Say I have a pages (or word maybe?) document, and I want to open it in pages from

From what I understand, UIApplication -openFile can open files externally, the application depending on the URL scheme. Say I have a pages (or word maybe?) document, and I want to open it in pages from my开发者_JS百科 app. Does anyone know the URL scheme for me to do that? Is there a list anywhere? (Keynote, and Numbers would also be useful).


It doesn't work that way because you cannot transmit the file via a URL and Pages cannot access a file that is stored in your app's sandbox.

If you want to give the user the option to open a file in Pages in your UI, UIDocumentInteractionController is the way to do that. It presents a UI where the user can preview the file and select to open it in any application that supports the file type.

AFAIK it is not possible with the SDK to do this completely programmatically, i.e. without user interaction.

0

精彩评论

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