diff options
author | Jason Wray <jason@mapbox.com> | 2017-09-15 18:34:06 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-09-15 19:00:32 -0400 |
commit | 9613582417dd32c6e943eb23b3aad620a5404f1e (patch) | |
tree | a13062d49ecb25651e116730319fe7b14d2f24af | |
parent | 95ae35239eaf01a25fde7af9ea8655f4c061741a (diff) | |
download | qtlocation-mapboxgl-9613582417dd32c6e943eb23b3aad620a5404f1e.tar.gz |
[ios] Be sure to get a BOOL value for nullable dict keys
Otherwise it errors with, "cannot initialize a variable of type 'BOOL' (aka 'signed char') with an rvalue of type 'id _Nullable'."
This doesn't seem like it should be necessary.
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 08fec00520..6acaa3c7f3 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -4312,15 +4312,15 @@ public: if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined) { BOOL requiresWhenInUseUsageDescription = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){11,0,0}]; - BOOL hasWhenInUseUsageDescription = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]; + BOOL hasWhenInUseUsageDescription = !![[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]; BOOL hasAlwaysUsageDescription; if (requiresWhenInUseUsageDescription) { - hasAlwaysUsageDescription = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysAndWhenInUseUsageDescription"] && hasWhenInUseUsageDescription; + hasAlwaysUsageDescription = !![[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysAndWhenInUseUsageDescription"] && hasWhenInUseUsageDescription; } else { - hasAlwaysUsageDescription = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]; + hasAlwaysUsageDescription = !![[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]; } if (hasAlwaysUsageDescription) |