Skip to content

Commit

Permalink
fix: ensure all location enums are caught
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 28, 2021
1 parent b8b87d8 commit c74d338
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion permissions.mm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool HasOpenSystemPreferencesDialog() {

// Returns a status indicating whether the user has authorized Bluetooth access.
std::string BluetoothAuthStatus() {
if (@available(macOS 10.15.0, *)) {
if (@available(macOS 10.15, *)) {
switch ([CBCentralManager authorization]) {
case CBManagerAuthorizationAllowedAlways:
return kAuthorized;
Expand Down Expand Up @@ -270,6 +270,7 @@ bool HasOpenSystemPreferencesDialog() {
// access.
std::string LocationAuthStatus() {
switch ([CLLocationManager authorizationStatus]) {
case kCLAuthorizationStatusAuthorized:
case kCLAuthorizationStatusAuthorizedAlways:
return kAuthorized;
case kCLAuthorizationStatusDenied:
Expand Down

0 comments on commit c74d338

Please sign in to comment.