Skip to content

Commit 8ef897c

Browse files
committed
SDK-842 move location based on server team feedback. Need unit tests
1 parent 7f48fbc commit 8ef897c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Branch-SDK/Branch-SDK/BNCDeviceInfo.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ - (NSDictionary *)v2dictionary {
149149
@synchronized (self) {
150150
[self checkAdvertisingIdentifier];
151151

152+
BOOL disableAdNetworkCallouts = [BNCPreferenceHelper preferenceHelper].disableAdNetworkCallouts;
153+
if (disableAdNetworkCallouts) {
154+
[dictionary setObject:[NSNumber numberWithBool:disableAdNetworkCallouts] forKey:@"disable_ad_network_callouts"];
155+
}
156+
152157
if ([BNCPreferenceHelper preferenceHelper].isDebug) {
153158
dictionary[@"unidentified_device"] = @(YES);
154159
} else {

Branch-SDK/Branch-SDK/Networking/BNCServerInterface.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,6 @@ - (NSMutableDictionary *)prepareParamDict:(NSDictionary *)params
457457
fullParamDict[BRANCH_REQUEST_KEY_INSTRUMENTATION] = self.preferenceHelper.instrumentationDictionary;
458458
}
459459

460-
// TODO: follow up with server team to get format and value location correct
461-
BOOL disableAdNetworkCallouts = self.preferenceHelper.disableAdNetworkCallouts;
462-
if (disableAdNetworkCallouts) {
463-
[fullParamDict setObject:[NSNumber numberWithInt:1] forKey:@"disable_ad_network_callouts"];
464-
}
465-
466460
return fullParamDict;
467461
}
468462

@@ -535,6 +529,11 @@ - (void)updateDeviceInfoToMutableDictionary:(NSMutableDictionary *)dict {
535529
[self safeSetValue:deviceInfo.applicationVersion forKey:@"app_version" onDict:dict];
536530
[self safeSetValue:deviceInfo.pluginName forKey:@"plugin_name" onDict:dict];
537531
[self safeSetValue:deviceInfo.pluginVersion forKey:@"plugin_version" onDict:dict];
532+
533+
BOOL disableAdNetworkCallouts = self.preferenceHelper.disableAdNetworkCallouts;
534+
if (disableAdNetworkCallouts) {
535+
[dict setObject:[NSNumber numberWithBool:disableAdNetworkCallouts] forKey:@"disable_ad_network_callouts"];
536+
}
538537
}
539538
}
540539

0 commit comments

Comments
 (0)