sdarlington / SDCloudUserDefaults

Store NSUserDefaults and iCloud data at the same time.
Apache License 2.0
108 stars 17 forks source link

If iCloud drive is off for a user what's the behavior? #10

Closed danielkramer closed 8 years ago

danielkramer commented 8 years ago

I am under the impression (maybe flawed) that sdclouduserdefaults stores the key/value in both nsuserdefaults and the key value store in iCloud. As iCloud is updated it updates the local defaults. I think that's what's happening which is great. But what if a user has iCloud turned off for my app? I tested that and I assumed it would just fall back to at least save the data in nsuserdefaults. It seems to work while my app is running, but if I kill my app running in the background and re-launch that new data is gone, doesn't appear to have been saved in the defaults.. maybe it was just saved in memory so once killed it's gone? Is that the expected behavior? Thanks Daniel

danielkramer commented 8 years ago

Follow up, looks like it's an issue on my end, looking at your code it's doing exactly what it should. Sorry for the false alarm!