Thursday, February 17, 2011

Objective C: Terminate App when pushing the Home button on iPhone/iPad

To make sure your iPhone or iPad App does not keep running in the background after you used the Home button, this is the way to go. Terminating the app helps saving resources on your device.

1. Open your project in Xcode.

2. Find the Info-iPhone.plist or Info-iPad.plist file.

3. Left-click once on it to see the Key Value pairs.

4. Right-click on one of the entries and select Add Row.

5. As key enter UIApplicationExitsOnSuspend.

6. Right-click on the new row and select Value Type Boolean.

7. Check the value field.

Let me know if you have any trouble.


Post a Comment