Hello I have an iPhone app working. It is based on web services. So i need WiFi/Cell connection. So i install app and get the data from web service and save it to Core Data DB on my phone.Now I work with the app creating a record.Works fine. If i have wifi i save the record to my SQL server. If not i save it to my iPhone. Here is my problem: After saving a record, i minimize the app. Then i delete it from the tray (i.e click home button twice and i get a tray of recent apps and i delete my app from there).Then immediately it stops working and goes in to main.m file with the exception. This is all in Simulator. On the actual device it goes back to login screen eventhough i have my login credentials clearly saved in settings. I want to know what happens when i kill my app from the tray. I put breakpoints in my appdelegate file and it doesnt hit anything..goes directly to main.m and exception. Where should i tell the app when it is relaunched to safely check for login details without throwing me an exception. To summarize : How to properly transition from killed state to relaunched state without getting exception.. If you need more information, please ask. Thanks..