iOS 8 CLLocationManager enterRegion: not getting called if use requestWhenInUseAuthorization

后端 未结 1 637
傲寒
傲寒 2021-01-21 22:55

I\'m trying to get being called the delegate method locationManager:didEnterRegion in iOS 8 for custom region. Here is the code:

self.locationManager = [[CLLocat         


        
相关标签:
1条回答
  • 2021-01-21 23:28

    region monitoring - it's not working with requestWhenInUseAuthorization

    check Apple Docs: ".. “when-in-use” ... Apps cannot use any services that automatically relaunch the app, such as region monitoring or the significant location change service"

    You must call requestAlwaysAuthorization!!! https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instm/CLLocationManager/requestWhenInUseAuthorization

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