• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
More prefs/iCloud KVS questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More prefs/iCloud KVS questions


  • Subject: More prefs/iCloud KVS questions
  • From: Rick Mann <email@hidden>
  • Date: Mon, 18 Mar 2013 16:42:26 -0700

I'm using NSUbiquitousKeyValueStore (KVS) to store some basic prefs for my app. I always write to NSUserDefaults and iCloud each time I update things. As I was building up my code, I was running into some issues getting the coding right, so I ended up with data in NSUserDefaults (on local disk), but not in KVS. I needed to remove that, so I found my prefs file and deleted it.

But when I ran again, the initial NSUserDefaults still returned the previously-saved data. I noticed there was also a "SyncedPreferences" folder, and a copy of my prefs file in there. Deleting that finally deleted all the data.

- First of all, if I'm not worried about key-value conflicts as described in the Apple docs, do I even need to use NSUserDefaults? What happens if someone is not signed in to iCloud (or has never signed in)? Does KVS still work, albeit locally only?

- What are SyncedPreferences? Are they related to KVS? It seems clumsy to have to use both NSUserDefaults and KVS.

Thanks,

--
Rick




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Understanding user defaults
  • Next by Date: Re: Understanding user defaults
  • Previous by thread: Re: Understanding user defaults
  • Next by thread: Week of month confusion?
  • Index(es):
    • Date
    • Thread