[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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user