开发者

Syncing all apps with [NSUserDefaults standardUserDefaults]

I am new t开发者_JAVA百科o iPhone programming. I am trying to make an app with multiple users in a workspace. Is it possible to use [NSUserDefaults standardUserDefaults] to constantly sync all apps being used in the workspace so that all apps running are up to date? Over WLAN or internet? thanks.

P.S-Just to be clear on what I am asking; say user adds a new client to the application, then all the apps running in the workspace will immediately be updated and add the client.


NSUserDefaults manages settings for only one app on one device.

Right now there is no built-in way to sync anything in your own app.

So you are responsible for syncing. And you have to do it on your own. There is no ready to use iOS-iOS Sync Framework available. Or at least I haven't found it yet.

I hope they include syncservices in iOS5, but I doubt it.


Currently, every app runs in its own "sandbox" - what that means is that each indivudal app can only make changes, save data, etc. to itself. It cannot modify any other app, or even access the information within another app. So NSUserDefaults only effect the current app's sandbox.

The only way to modify another app is if you have a server and it uploads that data to your server, then each app downloads the data from your server and refreshes regularly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜