requestAlwaysAuthorization not showing permission alert

前端 未结 17 1207
我寻月下人不归
我寻月下人不归 2020-12-29 20:19

I\'m trying to use some fancy iBeacons without success, kCLAuthorizationStatusNotDetermined all time. According to other questions it\'s a requirement to add those keys to

17条回答
  •  渐次进展
    2020-12-29 21:07

    I copied this tutorial ...

    http://willd.me/posts/getting-started-with-ibeacon-a-swift-tutorial

    It didn't work out the box, although the fix was very simple, don't declare

    let locationManager = CLLocationManager()

    But move it into the class as variable

    var locationManager = CLLocationManager()

    And it works!!

提交回复
热议问题