Are separate apps able to share the same binary in a form like a DLL? I know its possible to compile static libraries but I wouldn't count these as the same as a DLL (i.e. a dll is one copy of a binary shared by multiple apps, whereas static libraries are separately included by any using app).
Is each app totally separate from each other, are there any IPC or file sharing mechanisms available for differing apps to communicate and share data?
Is it possible for an app to create a new process in addition to a new thread (I guess not)?
You can't share executable files between applications. Apple requires that all apps function standalone. However you can use a UIDocumentInteractionController to get another program to deal with files you don't understand, and a 'quick view' may be available. That's how Mail works, for example.
Programs from the same vendor can share the keychain and, I think, iCloud storage as of iOS 5, but can't share storage on disk. As they can declare supported file types, UIDocumentInteractionController can be used to push temporary access to a file from one app to another. A custom URL scheme can be used in a similar way to pass fragments of data if that helps.
As a general rule, only one user process may be active at once in iOS - e.g. background processing is essentially event based. So you can't create a second process for yourself.
You can do this if you are developing for a jailbroken phone. Not
otherwise.On jailbroken phones, you can create .dylibs or shared libraries that can be
loaded via the DYLD_INSERT_LIBRARIES
environment var (much like on
MacOS)
Apps are sandboxed. However, there are some ways of communicating between apps. You can use
(a) customURL scheme (also mentioned by Tommy above) (if any) associated with an app to launch an app and send some parameters to the launching app
(b) If you control communicating apps, then you can use Message ports (CFMessagePortCreateRemote)
(c) If you control communicating apps, you could use Darwin NOtification center for distributed apps.
Of course the expectation for (b) and (c) is that the communicating apps are all running. On iOS since there is only one foreground process, you'd have to have the other as a background app and that's restricted to certain kinds of apps on the iOS platform.
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