Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will iOS region monitoring call didEnterRegion on my app if my app is in a terminated state?

Will iOS region monitoring launch my app in the background if the user enters a region that was successfully being monitored for prior to the app being terminated?

I know that the significant change API will do so and will let me know at launch time via the inclusion of the UIApplicationLaunchOptionsLocationKey key. If region monitoring will wake my app up out of a terminated state too, then what does the launch process look like? Is there a special key I should be looking for?

like image 223
John Erck Avatar asked Nov 08 '13 01:11

John Erck


2 Answers

Yes, see Region Monitoring

In iOS, regions associated with your app are tracked at all times, including when your app is not running. If a region boundary is crossed while an app is not running, that app is relaunched into the background to handle the event. Similarly, if the app is suspended when the event occurs, it is woken up and given a short amount of time (around 10 seconds) to handle the event.

like image 195
Jonah Avatar answered Nov 04 '22 08:11

Jonah


I have been searching for similar answer, but came across this: Region monitoring in ios 7

Seems like if the app is manually terminated by the user in iOS 7, location notifications will not wake the app to process it. Apple employee has commented here https://devforums.apple.com/thread/209302?tstart=0

like image 28
vijay Avatar answered Nov 04 '22 08:11

vijay