I have an app that will run in the background but there is one case where I do not want that to happen, can I achieve this programmatically?
I know I can opt out by
You can close the app by calling exit(0) in applicationDidEnterBackground.
exit(0)
applicationDidEnterBackground