Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing Data Between Apps on an iDevice

Is it possible to share on-disk data between iOS applications, or are they truly sandboxed? In other words if I wanted to make a shared repository of data to be accessed (and/or modified) by one or more of my apps, could it be done?

One of the listings on the iOS features page is "Share Data Among Apps", but is this what I'm looking for, and what are the related APIs?

Googling hasn't turned up much else in this area and I know I can construct a path to just about anywhere in the iDevice directory structure. Would it be against Apple's TOA, leading my apps directly to rejection, or is there hope for such an architecture?

like image 332
fbrereto Avatar asked Oct 28 '10 17:10

fbrereto


People also ask

How do I transfer data from one app to another iOS?

Use a shared app group to share data/files between two/more apps or containing apps. An app group creates a secure container that multiple processes can access. Normally, each process runs in its own sandbox environment, but an app group lets both processes share a common directory.

What does data shared by two apps mean?

The ability to share the same data resource with multiple applications or users. It implies that the data are stored in one or more servers in the network and that there is some software locking mechanism that prevents the same set of data from being changed by two people at the same time.

Can you share Apple Watch health data?

In the Sharing tab of the Health app, you can share any data you have stored in the Health app with up to 5 individuals. You control what data you share, and you can change it or stop sharing at any time.


2 Answers

Nothing too easy unless your app is iPad only. Otherwise this thing speaks about URL Prefixing. See "Implementing Custom URL Schemes" http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/StandardBehaviors/StandardBehaviors.html%23//apple_ref/doc/uid/TP40007072-CH4-SW7.

Here is some info on the iPad only Doc support: http://developer.apple.com/library/ios/#documentation/General/Conceptual/iPadProgrammingGuide/CoreApplication/CoreApplication.html%23//apple_ref/doc/uid/TP40009370-CH6-SW2 see "Document Support on iPad Devices". This DOES NOT work on iPhone/iPod

like image 104
grmartin Avatar answered Sep 26 '22 01:09

grmartin


That looks like marketing speak. The only way to share data locally is to pass it in the URL when launching another app. Otherwise, you need an internet server based solution.

Another thought: can you use TCP locally between apps with the new multitasking support? Apps like Air Sharing are allowed to create listening sockets.

like image 33
David Phillips Avatar answered Sep 22 '22 01:09

David Phillips