Persistent Data between Application Instances


I have coded the Inventory application, and everything is working as it should. However, I have noted that the data either does not persist between sessions or is not reading from the persistent store on startup. Working with the privateClass option, I’m inclined to believe the former, as there is no UPDATE sent to the SQLite database when the application terminates. I receive no other errors in the system, and no issues with creating new locations, assets, or inventory counts.

Is the data not actually supposed to persist at this point? I have tried it both in Simulator and on the iPhone 4. I am developing in 4.3.3 environment.



Have you tried copying the code in applicationWillTerminate and putting it in applicationDidEnterBackground ?



Yes! This spolved it for me. Thanks!