objective-cmacossharensuserdefaultsdefaults

Share user defaults between users


I'm using user defaults to store my app data.

I have some global data that is relevant for all users on the same machine.

How can I share this data between them?

NSUserDefaults' initWithSuiteName did not work.

The only workaround I found it to write to a hidden file in the root folder, but that is too visible to the users.


Solution

  • You can use the /Users/Shared directory like iTunes & the App Store.