Are CFPreferences "across app" readable?
Are CFPreferences across iPhone app readable?
In other words, can I write a NSUserDefaults style preference to disk and have it be readable in another iPhone app, if, for example, I didn't write this app, and am working from 开发者_如何转开发a static library?
I fear the answer is No. Period. Full stop. Any thoughts?
No. Apps have their own sandbox; you cannot interact between them in the manner you describe. As of iOS4, inter-app communication is quite limited.
One workaround is to use the keychain for storing small amounts of shared data, but there are many limitations to this method. You have to use the same id between applications and that precludes you from using push notifications and other features.
Alternatively, you could support Dropbox or something similar and store the shared information on the internet.
Neither is a great solution.
精彩评论