Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Quit and Restart my App programatically

KennyChongKennyChong Posts: 411Registered Users
edited October 2009 in iPhone SDK Development
Hi All,

How can I programmatically:

1. Quit my App
2. Restart my App

Thanks.
Post edited by KennyChong on
KennyChong<br />
iPhone SDK Fanatic!

Comments

  • ghayengaghayenga Posts: 4New Users
    edited October 2009
    KennyChong wrote: »
    Hi All,

    How can I programmatically:

    1. Quit my App
    2. Restart my App

    Thanks.

    1. Technical Q&A QA1561
    How do I programmatically quit my iPhone application?
    Q: How do I programmatically quit my iPhone OS application?
    A: There is no API provided for gracefully terminating an iPhone application. Under the iPhone OS, the user presses the Home button to close applications. Should your application have conditions in which it cannot provide its intended function, the recommended approach is to display an alert for the user that indicates the nature of the problem and possible actions the user could take - turning on WiFi, enabling Location Services, etc. Allow the user to terminate the application at their own discretion.

    WARNING: It is possible to quit the application by calling exit. Applications calling exit will appear to the user to have crashed, rather than performing a graceful termination and animating back to the Home screen. Such usage provides a negative experience and is strongly discouraged.

    2. You can't.
  • MehugeMehuge Posts: 17Registered Users
    edited October 2009
    Indeed, the key point for 1 is the user has to quit the application using the home button.
Sign In or Register to comment.