Andrew Z.
Andrew Z.

Reputation: 67

Sharing information between apps

There are two applications. How can they share information? Can we use a common database for them? Perhaps we can pass parameters from one application to another?

Upvotes: 0

Views: 157

Answers (1)

Matthew Frederick
Matthew Frederick

Reputation: 22305

You cannot directly share any resources; every app is in its own "sandbox" and cannot access the resources of any any other app.

You can send data back and forth between apps a couple of ways, however.

  1. If you want everything to stay on the device then you can implement application:openURL:sourceApplication:annotation: in both apps and provide a custom URL handler for both. The user will experience the device switching between the apps as they launch each other.

  2. If you are willing to use a server and internet connection, then both apps can read and write the same server resource. When each app launches or becomes active, it can check for updated information on the server.

Upvotes: 1

Related Questions