Skip to content

Commit

Permalink
feat: force use of restricted data
Browse files Browse the repository at this point in the history
  • Loading branch information
jbernhardt23 committed Jun 14, 2023
1 parent bebfa69 commit 963f94e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ public void run() {
correlator = (String) Targeting.getCorelator(adUnitID);
}
Bundle bundle = new Bundle();
//Restrict data processing by default for all users
bundle.putInt("rdp", 1);
bundle.putString("correlator", correlator);

adRequestBuilder.addNetworkExtrasBundle(AdMobAdapter.class, bundle);
Expand Down
7 changes: 5 additions & 2 deletions ios/RNAdManageNativeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ + (BOOL)requiresMainQueueSetup

adsManager.adUnitID = adUnitID;
adsManager.testDevices = RNAdManagerProcessTestDevices(testDevices, GADSimulatorID);

_myAdChoiceViewAdUnitID = adUnitID;

[adsManagers setValue:adsManager forKey:adUnitID];
Expand All @@ -107,7 +107,7 @@ - (GADAdLoader *) getAdLoader:(NSString *)adUnitID validAdTypes:(NSArray *)valid
if (adLoaders == nil) {
adLoaders = [NSMutableDictionary new];
}

NSString *adLoaderKey = adUnitID;
if ([validAdTypes containsObject:@"native"]) {
adLoaderKey = [NSString stringWithFormat:@"%@%@", adLoaderKey, @"native"];
Expand Down Expand Up @@ -137,6 +137,9 @@ - (GADAdLoader *) getAdLoader:(NSString *)adUnitID validAdTypes:(NSArray *)valid
GADVideoOptions *videoOptions = [[GADVideoOptions alloc] init];
videoOptions.startMuted = YES;

//Restrict data processing by default for all users
[NSUserDefaults.standardUserDefaults setBool:YES forKey:@"gad_rdp"];

adLoader = [[GADAdLoader alloc] initWithAdUnitID:adUnitID
rootViewController:[UIApplication sharedApplication].delegate.window.rootViewController
adTypes:adTypes
Expand Down

0 comments on commit 963f94e

Please sign in to comment.