Currently, my application is experiancing a strange couruption and crashing behavior in the NSUserDefaults subsystem.
We believe we are using the api correctly, but notice that after updating our application from the current, older App Store version, to our working HEAD version, every key that our application sets in the defaults is either “corrupted", or missing entirely. This behavior seems to vary based on physical device, but seems to be consistent across installs. (That is, if one user experiences missing data after updating, they always experience that behavior. If another user experiences corrupt behavior, they always experience that behavior.)
By corruption, we mean that NSUserDefaults ought to return a verity of data types corresponding to the type of data entered. Instead, strange data (
_NSCFData
) blobs are being returned.We believe we’ve been able to isolate this issue to be occurring strictly outside of our own code base. Placing a breakpoint right before the call to
UIApplicationMain()
and have used lldb to print out:po [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
Which yields the usual apple keys, and our own entries which look like:
KeyName = <f475198e ac5618c4 e0bc14a3 856fa068 10597406 .... >
This seems very unusual and guidance would be much appreciated.