Geofencing in iOS When App is closed / Killed

后端 未结 1 457
既然无缘
既然无缘 2021-01-13 15:12

I am working on Geofencing and I want to trigger \"didEnterRegion\" and \"didExitRegion\" it is working when the app is in foreground or in

相关标签:
1条回答
  • 2021-01-13 15:28

    Sorry but is a bit different: (ADC SITE)

    If you leave the significant-change location service running and your iOS app is subsequently suspended or terminated, the service automatically wakes up your app when new location data arrives. At wake-up time, the app is put into the background and you are given a small amount of time (around 10 seconds) to manually restart location services and process the location data. (You must manually restart location services in the background before any pending location updates can be delivered, as described in Knowing When to Start Location Services.)

    So iOS will awake your app BUT you must: 1) instantiate a NEW CLLocationManager 2) wait 'till first call back to use geoloc

    notes ADC states, you will be running in background, so or example use local notification if You need the user put it in foreground.

    0 讨论(0)
提交回复
热议问题