I'm storing a value in NSUserDefaults that I use to check if it's the first time the app has been launched. I check this value in my App Delegate and it works fine for the most part. However, I expected that this value would clear if I deleted the app from the device so that when launched the first time after being reinstalled it would behave as though it had never been installed on that device. However, the value stored in NSUserDefaults is still there. Now I know how to clear NSUserDefaults programmatically but how would I do this and still be able to tell if it's the first time the app has been launched (and have the first time launched after being deleted be detected as a first launch)?
Edit: This issue was for an actual physical device (not the simulator). Deleting the app from the simulator DID clear NSUserDefaults correctly. However, I had my iPhone replaced yesterday and the new phone doesn't exhibit this issue. NSUserDefaults is clearing correctly now. Don't know what fixed the problem but I'll take it.