From 9613582417dd32c6e943eb23b3aad620a5404f1e Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Fri, 15 Sep 2017 18:34:06 -0400 Subject: [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. --- platform/ios/src/MGLMapView.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'platform/ios') 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) -- cgit v1.2.1