Is it possible for two applications to access documents in each other applications given that they have the same bundle seed id. I know that it is possible to share items in the keychain with applications that share a bundle seed id (see here).
For example, let's say you had an application that had a free version and a paid version. Is it possible that after someone has upgraded from the free to the paid version you could migrate their data over to the paid version?
Invite more people to share a folder or fileTouch and hold the folder or file. , then tap Manage Shared Folder or Manage Shared File. Tap Add People and choose a method for sending the link. Enter any other requested information, then send or post the invitation.
iCloud Drive lets you securely access all of your documents from your iPhone, iPad, iPod touch, Mac, or PC. No matter which device you're using, you'll always have the most up-to-date documents when and where you need them.
You cannot share document directories between applications. But there are other communication channels open.
The keychain is one possibility, as you mentioned.
Another could be custom URL schemes. Maybe a bit like this:
freeapp://
scheme. Similarly the pro app registers the ability to open URLs with the proapp://
scheme. Use the "URL Types" entry in the info plist.[UIApplication canOpenURL:@"freeapp://goPro"] == YES
[UIApplication openURL:@"freeapp://goPro"]
handleOpenURL
from UIApplication
.NSCoding
.[UIApplication openURL:@"proapp://YOUR_DATA_IN_WHATEVER_FORMAT"]
handleOpenURL
from UIApplication
and performs the necessary data migration.Obviously you want to use more unique URL schemes than the above.
Consider the security implications of being able to inject this type of data into your app using URLs, though. It's probably OK for many purposes, but I'm sure that if the Facebook app provided a way to nuke your account settings via a URL some people would find it hilarious to post facebookapp://reset_my_account
links everywhere.
Bonus tip: URL schemes are also very handy for bridging the gap between native code and web views. I have had a few apps with an embedded web view showing a page on a server under my control. The web page can talk to the app by setting the document location from JS. The app can intercept the request in the web view delegate and talk back to the web view using stringByEvaluatingJavaScriptFromString
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With