In my application, I need to share the setting between the various devices using the application. I want the first device that installed the application to set the main value of the parameter, then all other devices should receive this parameter and not overwrite it.
How do I make sure that I check first if iCloud has a value before setting the value? Therefore, I do not overwrite the existing one.
Should I wait for NSUbiquitousKeyValueStoreInitialSyncChange to be sent, and then I can check for a possible existing value and otherwise set it for the first time? If so, can I expect to receive an NSUbiquitousKeyValueStoreInitialSyncChange event? If not, it may turn out that it does not set the iCloud value at all with this approach.
If I try to set the value before NSUbiquitousKeyValueStoreInitialSyncChange is started for the first time, will it be canceled and then NSUbiquitousKeyValueStoreInitialSyncChange will be started with existing data in the repository?
I heard that NSUbiquitousKeyValueStoreInitialSyncChange does not start if there are no values in the repository when they are synchronized for the first time?
I read the Apple documentation about this and saw the answers here in the Stack Overflow section, but I don’t understand how to do this.
How can I make sure that I do not overwrite the existing value when I first start / install the application?
ios objective-c ios5 icloud nsubiquitouskeyvaluestore
thejaz
source share