Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I transfer a document between two apps on the same iOS device?

I have an iPhone app that some of my users are running on their iPad in emulation mode. We're thinking about creating an iPad-optimized app, as well, which would be a separate app in the App Store (more features, different price point).

The problem is: if a user is running the iPhone app on an iPad and then they purchase our iPad-optimized version, how can they migrate their data out of the iPhone-only app and into the new iPad app?

Here are some alternatives I've considered:

  • As recommended in other SO questions, the secure keychain. The problem is that this only allows a small chunk of data to be transferred. Our users are likely to have tens of megabytes of data
  • Registering URI schemes (also suggested in other SO questions, also appears to be designed for only very small amounts of data)
  • Let the user upload the data from the iPhone-only app to a service like Dropbox or box.net, then from the iPad version, download that data again. Advantage is that these services have very straightforward APIs; disadvantage is that the user may need to create an additional account and/or download another app just to move data
  • Create an iCloud document. No signup required, but setting up iCloud storage is, to put it lightly, nontrivial

Are there any other options for transferring tens of megabytes of data between two apps on the same device.

like image 396
Bill Avatar asked Mar 02 '12 04:03

Bill


1 Answers

You can use a UIDocumentInteractionController to let the user open a document in any app on the device that has registered support for the document type.

This will still make a copy of the document in the iPad app's sandbox. There's no getting around that.

like image 145
rob mayoff Avatar answered Oct 21 '22 07:10

rob mayoff