NSUserDefaults not cleared after app uninstall on simulator

I think this is due to a bug in the iOS8 Beta Simulator.

The expected behavior is that when the app is deleted, the NSUserDefaults for that app are deleted as well.

  • However, NSUserDefaults are NOT deleted when you remove an app from the simulator.
  • They are correctly deleted when you delete them from a physical device running iOS8.

A quick and annoying solution for now is to click, iOS Simulator -> Reset Content and Settings.

Xcode 9.2 with Simulator 10 still presents this issue. Menu option is now Hardware .. Erase All Content and Settings

I submitted a bug report btw

Leave a Comment