2

I know this isn’t possible in iOS 7 But after searching I read on some forums that it was possible in iOS 6. Now the question is, I want to relaunch the app if the app is in background and gets killed because of non activity. Currently I am triggering location updates every 10 minutes when the app is in the background but It drains a lot of battery and I am sure Its not the right way to do it. I would like to know If someone has implemented this type of behavior successfully in iOS 6.

Note: This is a concept app. Not meant for App Store..

Obj-Swift
  • 2,802
  • 3
  • 29
  • 50
  • Maybe this link could be useful for your purposes: http://stackoverflow.com/questions/10395142/how-to-restart-app-if-it-unexpectedly-shutdown – RFG Nov 04 '13 at 16:31
  • Thanks Rauru. Based on that thread it seems its not possible to restart the location monitoring apps but I think there exists some way to do it.. – Obj-Swift Nov 04 '13 at 16:37

1 Answers1

0

First thought : in you app delegate you have :

-(void)applicationWillResignActive:(UIApplication *)application

-(void)applicationDidEnterBackground:(UIApplication *)application

-(void)applicationWillEnterForeground:(UIApplication *)application

-(void)applicationWillResignActive:(UIApplication *)application

-(void)applicationDidEnterBackground:(UIApplication *)application

-(void)applicationWillEnterForeground:(UIApplication *)application

You can play with them methods and put actions in them to don't allow the device to shut down your application. I was using that to maintain my application to not shut down under ios3 then ios6 the ios7 :3. give it a shot it worked for me and doesn't drain that much battery.

Tirth
  • 7,801
  • 9
  • 55
  • 88
Hakeem El Bakka-lee
  • 756
  • 1
  • 7
  • 23