The documentation seems to say that kCLAuthorizationStatusAuthorizedAlways should be an acceptable return from CLLocationManager.authorizationStatus()
though this:
Is inconsistent with the name of the other possible values like .AuthorizedWhenInUse
, .Denied
& .Determined
.
CLLocationManager.authorizationStatus() == .AuthorizedAlways
//'CLAuthorizationStatus.Type' does not have a member named 'AuthorizedAlways'
CLLocationManager.authorizationStatus() == .kCLAuthorizationStatusAuthorizedAlways
//'CLAuthorizationStatus.Type' does not have a member named 'kCLAuthorizationStatusAuthorizedAlways'
.Authorized
does work and points to the same integer value as should .AuthorizedAlways
(according to the Objective-C documentation), though, it's deprecated.
Any suggestion about a correct, not deprecated, implementation?
.AuthorizedAlways
has replaced .Authorized
in iOS 8.2. If you're using the 8.2 SDK or later, use .AuthorizedAlways
. See iOS 8.2 API Diffs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With