2

Is it possible to programmatically entering background in iOS 5 or higher? I'd like to be able to ask the user with an alertView if she'd want to proceed to run the app in background to save battery.

Thanks!

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
AppsDev
  • 12,319
  • 23
  • 93
  • 186
  • It's not possible to run the app in background in a indefinitely manner. In particular, it depends on the nature of your tasks. See Apple doc for this [App States and Multitasking](http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW20) – Lorenzo B Feb 24 '13 at 11:22
  • I'm going to call location manager in background... AFAIK, location services are allowed to be long-running tasks in background, aren't they? – AppsDev Feb 24 '13 at 11:39
  • The thread you refer was opened almost 2 years ago, it could be deprecated – AppsDev Feb 24 '13 at 11:42
  • @AppsDev All of the details in the duplicate are still valid. There is still no App Store friendly way to programmatically send an app to the background. – rmaddy Feb 24 '13 at 16:25
  • @rmaddy Even if you are asking for user confirmation? – AppsDev Feb 24 '13 at 16:40
  • @AppsDev Correct. Just tell the user to press the Home button or tap Cancel on the alert view. You can auto-dismiss the alert of the app enters the background. – rmaddy Feb 24 '13 at 16:47

0 Answers0