meetpd
meetpd

Reputation: 9219

iPhone: Is it possible to close the app rather than run in background when user clicks Home Button?

I have an app which crashes everytime when I resume it.

I want that when user clicks Home button, the app should close rather than go in background mode.

Is that possible? If yes, please let me know.

If not, what could be the workaround so that my app does not crash when I resume it?

Thanks!

Upvotes: 0

Views: 279

Answers (2)

Ilanchezhian
Ilanchezhian

Reputation: 17478

In the plist, set YES to Application does not run in background key.

When ur application is in background, due to memory insufficient, the views (and the objects released in viewDidUnload) might be released. Again when reopen the application, make sure all the required objects are re-initialized.

Upvotes: 5

Krishnabhadra
Krishnabhadra

Reputation: 34265

To opt out of background execution, see this thread... But ideally what you should do is fix the crash and let app user enjoy iOS background feature..

what could be the workaround so that my app does not crash when I resume it?

Never think of work arounds when you can handle it straight..

Upvotes: 1

Related Questions