Various iOS apps log out randomly, lose all data & settings

I've been experiencing an issue that has causing me a lot of problems, as various apps including Whatsapp, Telegram, Linkedin, Slack, Lastpass, and more will randomly log out, and reset back to their inital state as if I just installed it on a clean phone. Apps like Whatsapp and Telegram will have lost all of their chat history, even if it was backup up on iCloud.

I'm at a total loss as to what might be causing this problem after restoring the phone multiple times (the last time without restoring to a backup).

My phone is an iPhone 6S 64GB running iOS 10.2 (isn't BETA).


This issue exists for about a year now (it seems that this bug was introduced in iOS 9.3.1 and is still present in iOS 10.2).

The problem seems to be that after an App is launched and tries to load its settings from NSUserDefaults, it does not get any data. It looks like NSUserDefaults sometimes "forgets" to load its data from the file system. If you manage to kill the App before it tries to store new data in NSUserDefaults and the restart the App, chances are good that this time NSUSerDefaults does load the data correctly and the App can get all its settings again. But as soon as the App stores anything in NSUserDefaults, all old data is overwritten and lost forever.

But killing an App before it can store anything in NSUserDefaults is usually only possible for your own Apps when running them in the debugger.

There are a lot of threads here in the developer forums related to this topic. We all hope that Apple will someday find and fix this annoying bug. Even though with some luck the issue won't show up very often, it is nevertheless very annoying. Please send bug reports to Apple, so Apple learns that this is serious.

Here are a few other related threads:

Hm, I'm currently furiously looking for the reason users in our app is being logged out. I use NSUserDefaults with encryption to store the authentication token. For some reason, after our last update, users are logged out en masse. We have barely changed the code at all. And surely nothing considering the saving of the token. My initial fear was that [[UIDevice currentDevice]identifierForVendor] had changed after update. I've found bugs on that reported previously.

Hi, I have the same issue since I started developing for/on the iPhone with a second Mac and a second Apple ID...

Might be a little off topic but is better not to use UserDefaults to store tokens. Use Keychain instead. As explained in this example from Apple

I have encountered this in development. I found that I can access the keys that should be there by inserting a random value into NSUserDefaults and checking again.

BOOL seen = [[NSUserDefaults sharedUserDefaults] objectForKey:MY_KEY] != nil;

if (!seen) {

// are you sure? try again...

[[NSUserDefaults sharedUserDefaults] setObject:[NSUUID UUID].UUIDString


seen = [[NSUserDefaults sharedUserDefaults] objectForKey:MY_KEY] != nil;


return seen;

I never ever experienced this issue and now, I’m not sure but it looks like after the last automatic update, I’m being logged out of almost every single app, it’s so annoying and frustrating. Please help. I also get the annoying image of a keyboard showing me the keyboard feature where I can compose words/type by moving my thumb around the letters without lifting the thumb like a new feature I guess similar to when you log to an android device (passcode) to unlock it. Please advise. I’m running out of patience. Thank you!

This recently happened to me and caused multiple Authenticator apps (Authy, Microsoft Authenticator, and others) to lose all saved data which effectively locked me out of various critical accounts. Ridiculous that this has not been fixed.

Ios 16.3, same thing. Randomly logging out from websites and apps

Bug is still not fixed, and is super annoying! Most of my apps signed out. I sign in and next day same thing ! Fit it please!!!’

I am also having the same issue. Why this is not yet fixed