sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

LocationAlways should not require LocationAlwaysInUseDescription #89

Closed MatrixSenpai closed 5 years ago

MatrixSenpai commented 5 years ago

Post iOS 10, when requesting LocationAlways permissions, NSLocationAlwaysUsageDescription key is disabled/not used. Instead,NSLocationAlwaysAndWhenInUseUsageDescription is required.

As per Apple's CoreLocation Documentation, only NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription are required.

The suggested fix is to either drop support for <iOS 10, OR update SPPermissionType to

...
case locationAlways = 8
case locationWhenInUse = 9
@available(iOS, introduced: 11.0)
case locationAlwaysAndWhenInUse = 12
...
MatrixSenpai commented 5 years ago

locationWhenInUse should also probably be marked as deprecated