Mamatha
Mamatha

Reputation: 53

iOS: Open document of an app from another app and save back to the called app

In my application, I want to open excel documents listed in my application using any excel editor. Edit it and save back to my application only. Can this be possible on iOS?

As I looked into this, I could open using an excel editor, edit the file, but file is saved in the called application's folder, not in my application folder.

Is there any way I could achieve this? Kindly suggest.

Thanks.

Upvotes: 2

Views: 1971

Answers (3)

orkoden
orkoden

Reputation: 20026

iOS does not provide a feature directly to support this. But there are two ways to achieve your desired behavior.

In both cases the apps have to cooperate and conform to a specification. The calling app passes information to the other app, which the other app then uses to send data back eventually.

Custom URL schemes

Apps can voluntarily communicate with custom URL schemes. Some apps support x-callback-url for that.

UIDocumentInteractionController annotation

Another possibility is passing an annotation dictionary to the UIDocumentInteractionController that opens the other app. QuickOffice has a save back API, that could be used like that. It seems to be deprecated though and the documentation has been removed.

Upvotes: 2

dandan78
dandan78

Reputation: 13925

On iOS each application exists in its own sandbox, separated from other apps except for several rather indirect modes of interaction, such as registering URLs and UIDocumentInteractionController. The security benefits of this approach are fairly clear, but of course they do have certain drawbacks.

One such drawback is that allowing app B to save data to the sandbox of app A would defeat the purpose of sandboxing.

On a jail-broken device on the other hand...

Upvotes: 1

RAJA
RAJA

Reputation: 1214

To my knowledge there is no option to save documents to our application from the external application. As you mentioned, we are having only option to open-url document using our application programmatically.

If the external application have option to open the documents through other applications, then there is an option to open/save that edited document through your application.

Upvotes: 0

Related Questions