Skip to content

Commit

Permalink
feat(ios): update mobile ads sdk to 12.0.0 with source code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dylancom committed Feb 4, 2025
1 parent 524d9e5 commit 34e4cd5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
4 changes: 1 addition & 3 deletions ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.mm
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,8 @@ + (NSDictionary *)getCodeAndMessageFromAdError:(NSError *)error {
code = @"internal-error";
} else if (error.code == GADErrorInvalidArgument) {
code = @"invalid-argument";
} else if (error.code == GADErrorReceivedInvalidResponse) {
} else if (error.code == GADErrorReceivedInvalidAdString) {
code = @"received-invalid-response";
} else if (error.code == GADErrorMediationNoFill) {
code = @"mediation-no-fill";
} else if (error.code == GADErrorAdAlreadyUsed) {
code = @"ad-already-used";
} else if (error.code == GADErrorApplicationIdentifierMissing) {
Expand Down
6 changes: 1 addition & 5 deletions ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,7 @@ - (void)setRequestConfiguration:(NSDictionary *)requestConfiguration
if (requestConfiguration[@"testDeviceIdentifiers"]) {
NSMutableArray *devices = [@[] mutableCopy];
for (NSString *key in requestConfiguration[@"testDeviceIdentifiers"]) {
if ([key isEqualToString:@"EMULATOR"]) {
[devices addObject:GADSimulatorID];
} else {
[devices addObject:key];
}
[devices addObject:key];
}
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = devices;
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
],
"sdkVersions": {
"ios": {
"googleMobileAds": "11.13.0",
"googleMobileAds": "12.0.0",
"googleUmp": "2.7.0"
},
"android": {
Expand Down Expand Up @@ -172,5 +172,6 @@
"android": {
"javaPackageName": "io.invertase.googlemobileads"
}
}
},
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
}
4 changes: 2 additions & 2 deletions src/types/RequestOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export interface RequestOptions {
/**
* key-value pairs used for custom targeting
*
* Takes an object of keys with values of string or array of strings.
* Takes an object of keys with values of string, number, or arrays of strings/numbers.
*/
customTargeting?: { [key: string]: string | string[] };
customTargeting?: Record<string, string | number | (string | number)[]>;

/**
* Sets the request agent string to identify the ad request's origin. Third party libraries that reference the Mobile
Expand Down

0 comments on commit 34e4cd5

Please sign in to comment.