I store the value in NSUserDefaults, which I use to check if it was the first time I started the application. I check this value in the App Delegate app and it works fine for the most part. However, I expected that this value would be cleared if I uninstall the application from the device, so that when it first starts after reinstalling it, it will behave as if it had never been installed on this device. However, the value stored in NSUserDefaults still exists. Now I know how to purge NSUserDefaults programmatically, but how would I do it and can still tell if it was the first time I started the application (and was first launched after it was uninstalled as the first run)?
Edit: This problem was for a real physical device (not a simulator). Removing the application from the DID simulator will clear NSUserDefaults correctly. However, yesterday I had an iPhone, and the new phone did not detect this problem. Now NSUserDefaults is correctly cleared. I donβt know what fixed the problem, but Iβll take it.
source
share