Sunday, January 23, 2011

How to Make App Does not run in the Background in ios4

In ios3 or lower version making app does not run in the background is easy as there exists "UIApplication does not run in the background" key in the info.plist. But in ios4 it is not available by default. You will have to add it manually.
If you don't want your program to run in the background then do the following things-

- Go to your info.plist in the resource folder of your app and open it with a text editor.
- Now Add this

<key>UIApplicationExitsOnSuspend</key>
<true>

- Save, close and run the app. Your application will not run in the background anymore.

1 comment:

  1. so if I have an alarm clock app and I want it to run on all ios... do I add the UIApplicationExitsOnSuspend to False because I want it to keep running.

    ReplyDelete