I have an iPhone app that will exit after a user performs a specific action. I am currently using exit (0) to leave the application, and until recently, I had no problems. I understand that this is not the “right” way to exit the application, but this is what I want to do. The problem I am facing is when the device goes from sleep mode, while my application is active, exit (0) is called and the application restarts after exiting.
This seems rather strange to me, and I wonder if this is a mistake, or am I something wrong? Is there a better way to gracefully exit the application without clicking on the home key?
thank
source
share