user798719
user798719

Reputation: 9869

Do NSUserDefaults get synced to iCloud? I don't want them to be

I am storing a username/password in NSUserDefaults. I do not want this information to be backed up to iCloud.

How can I make sure that this does not happen? From the docs, it seems like NSUserDefaults are not backed up at all unless you use NSUbiquitousKeyStore.

Do I have the right interpretation?

Thanks!

Upvotes: 3

Views: 1146

Answers (1)

Dan Fairaizl
Dan Fairaizl

Reputation: 2170

This is correct. iCloud can do key/value storage but you have to explicitly use this functionality. NSUserDefaults will not get synced with iCloud because the defaults pList stored on disk is not within the ubiquity container.

Upvotes: 4

Related Questions