• 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
How do we know if iCloud actually contains a key/value pair?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do we know if iCloud actually contains a key/value pair?


  • Subject: How do we know if iCloud actually contains a key/value pair?
  • From: G S <email@hidden>
  • Date: Mon, 05 Mar 2012 22:48:14 -0800

When our iPhone app is launched for the first time, it checks the user's
iCloud account to see if he has installed our app on another device.  If
so, he'll have a unique ID that we've stored in his iCloud account, which
is a database key that we use to manage his online content.  We grab it and
store it in local user defaults.

If the user doesn't have an ID in iCloud, we create one, store it in local
user defaults and save it to iCloud.

During appDidFinishLaunching, I instantiate the ubiquitous store and call
[synchronize].

After figuring out that we always have to listen for the
NSUbiquitousKeyValueStoreDidChangeExternallyNotification (even though the
external repository actually didn't change), I'm left with this question:
 How do I know if this call simply failed, or if the value is absent from
the remote server?

Will this notification be issued even if the key/value pair doesn't exist?
 If not, how do I ever know that key/value pair is absent from iCloud and
that I won't be overwriting it if I store a new one there?

Thanks for any insight.

Gavin
_______________________________________________

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: Efficiency Question...
  • Next by Date: Re: notAKeyMarker crash
  • Previous by thread: Re: Efficiency Question...
  • Next by thread: JSON validator for Xcode
  • Index(es):
    • Date
    • Thread