02-07-2012 12:14 PM
I need an update count in my application such that the user will know how many notifications they have. The number of notifications show up on the home screen beside the icon. The way I am keeping track of the icon variable "iconCount" between different entry points is through a singleton. I need to have this count be present even after the user turns off their device on and off. So if there are 7 updates available for them 7 will show up until they check the application ( it will not reset to 0 when the device is turned off).
As a test to see what would happen if I set the count to 7 and turned off the device through the simulator; I held down the power button until it stated "turning device off, press any key to abort" then the screen went black. I waited a few seconds and pressed the hangup button again and the simulator powered up to show 7 new notifications.
This is a bit strange to me, I though you would need persistent store to accomplish this? Was I turning off the device properly, or does a singleton in fact hold the variable even after the device is shut off.
Solved! Go to Solution.
02-08-2012 03:58 AM
02-08-2012 04:13 AM
If you want to simulate hard reset you can restart the simulator. Pressing End button will only soft reset it.
02-08-2012 09:34 AM
Would this be simply closing the simulator window and selecting the project and Run As -> simulator again?
02-08-2012 09:51 AM