NSUserDefaults Clearing after Killing Apps

Hi,


I'm having an issue that appears to be specific to my iPhone 6S running iOS 9.3.2. I tried calling Apple support and they said to post it here since they didn't speak "developer".


For clarity, I am a developer and first noticed the issue I'll describe with our own app.


When launching Flipboard, Zillow, and basically any app with clear persitent identifiers saved in NSUserDefaults, killing an app via double tapping home and swiping up is causing the app to act like a fresh install on next launch with all NSUserDefaults cleared. I have to re-login and any help prompts appear again.


I've verified this with our own application by logging the nsuserdefaults on launch and they are indeed cleared.


The oddest thing is that no other users or friends with devices running these apps can reproduce the issue.


It appears to be an OS level corruption possibly.


Any ideas?


Thanks

James

Replies

Many others have experienced this issue as well (see https://forums.developer.apple.com/thread/44264 as an example). I seems that this bug was introducded with iOS 9.3.1. I'm not sure what exactly is triggering the bug. I can see many Apps losing their settings, mainly after I've used a lot of different Apps. So you might be right that this could be related to Apps being terminated. And this means you probably do not need to manually terminate the Apps, this will also happen when the iOS itself terminates the Apps in the background when the free memory is running out.


Please send a bugreport to Apple.

I found that while this bug returns over time, resetting the phone several times solves it temporarily. After a few weeks it returns.


I suspect the defaults are somehow getting corrupted by an app on the device.


Thanks

James

Please Apple... this bug is real! Many developers have it (See. f.e.: https://forums.developer.apple.com/thread/44264)

Would be nice if you could fix it. After my last reset of my device it was good, but now I am seeing the problem again very very often... 😟

Do you have a bug number for this issue? If not, please Report a Bug.


As they say, if there isn't a bug number, there isn't a bug.

27252389