Roy Coder
Roy Coder

Reputation: 25

Location Tracking

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?

Upvotes: 2

Views: 141

Answers (2)

progrmr
progrmr

Reputation: 77291

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.

Upvotes: 0

tilo
tilo

Reputation: 14169

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.

Upvotes: 2

Related Questions