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
Add the variable UIApplicationExitsOnSuspend (Application does not run in background) to your applications plist and assign the value YES.