UPDATE: I created a test project for that (to isolate the issue), and it seems that simulator is fine but running on device with 9.3.1 even using Xcode 7.3 makes same issue.
I guess it is just broken with 9.3.1 !
After upgrading to 9.3.1 …
From 9.3? Or from some earlier 9.x?
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
I'm expereience with the same bug.
All stored data in NSUserDefaults is deleted every day after upgrading from 9.2.1 to 9.3.1.
In another thread there's a discussion about the same issue: https://forums.developer.apple.com/thread/44264
There's a suspicion: iOS 9.3 does not really delete the NSUserDefaults, but only forgets to load the data. If you can prevent that the App will save any new data in NSUserDefaults when this happens (usually only possible when debugging your own Apps in XCode), kill the App and restart, the settings are usullay loaded fine this time. But in real world scenarios you can't prevent that Apps will save anything in NSUserDefaults after this iOS bug shows up, and as soon as an App saves anything in NSUserDefaults, the old settings are overwritte, lost and really deleted.
I've seen this issue in several Apps now, so this gets really annoying...
Anyone have any joy? I'm still seeing it in iOS 10.1
Just posted some interesting things I've seen here: https://forums.developer.apple.com/message/135342
Including the very odd thing I saw today where data from 2 years ago, that had been very much deleted, was resurrected in one of my apps... is iCloud misbehaving??
This is also happening for me as well. Data that I've set the previous app start is vanished the next time. It doen't happen all the time and also other apps are affected (like Whats App, Slack, Youtube, ...)
Other users have the same problem: https://forums.developer.apple.com/thread/44264
Today in the log concole of my app I found the following:
[User Defaults] Failed to write value for key <xxx> in CFPrefsPlistSource<0x17011b240> (Domain: <xxx>, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): Path not accessible, switching to read-only
Might have something todo with it?
Would be really great if somebody could really fix that bug. It anoys me since about a year... With long times inbetween beeing fine, but then comming back again like currently...