2

I have application which is sending tracked data to our hosted server whenever location manager called in background. Its working fine normally.

But issue is when user switched off the iPhone and turn ON it back application is showing GPS icon but application is not giving response.

PS: User have not touch the app or start after restart the app.

Is it possible to get the response from the app after restart the device?

tilo
  • 14,009
  • 6
  • 68
  • 85
Roy Coder
  • 25
  • 3

2 Answers2

2

That is because the app is not active after restarting the iPhone. You could add the voip key to UIBackgroundModes as detailed in this SO post (and a sample app on GitHub) to start your app again after restarting the device. However, if you use this app only for tracking the location, Apple will likely reject your submission for making use of the voip-key.

Community
  • 1
  • 1
tilo
  • 14,009
  • 6
  • 68
  • 85
  • For location service Required background modes value should be "App registers for location updates", no need to set voip key. – Vishwa Patel Oct 25 '13 at 07:00
  • 1
    @VishwaPatel true, but this won't start the app when restarting the device. – tilo Oct 25 '13 at 07:12
0

If you use region monitoring, then your app will be automatically started in the background when a user enters or leaves a region, even if the device is turned off and back on. Use region monitoring, see this answer on SO.

Community
  • 1
  • 1
progrmr
  • 75,956
  • 16
  • 112
  • 147