Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Fix root.plist flag conversion. #288

Merged
merged 2 commits into from
Apr 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions platform/ios/src/MGLMapboxEvents.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ + (void)ensureMetricsOptoutExists {
if (!metricsEnabledSettingShownInAppFlag &&
[[NSUserDefaults mme_configuration] integerForKey:MGLMapboxAccountTypeKey] == 0) {
// Opt-out is not configured in UI, so check for Settings.bundle
id defaultEnabledValue;
BOOL defaultEnabledValue = NO;
NSString *appSettingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];

if (appSettingsBundle) {
Expand All @@ -196,7 +196,8 @@ + (void)ensureMetricsOptoutExists {
NSArray *preferences = settings[@"PreferenceSpecifiers"];
for (NSDictionary *prefSpecification in preferences) {
if ([prefSpecification[@"Key"] isEqualToString:MGLMapboxMetricsEnabledKey]) {
defaultEnabledValue = prefSpecification[@"DefaultValue"];
NSNumber *defaultValue = prefSpecification[@"DefaultValue"];
defaultEnabledValue = [defaultValue boolValue];
}
}
}
Expand Down