Skip to content

Commit a716c32

Browse files
committed
feat(ios): update mobile ads sdk to 12.0.0 with source code changes
1 parent 524d9e5 commit a716c32

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,8 @@ + (NSDictionary *)getCodeAndMessageFromAdError:(NSError *)error {
118118
code = @"internal-error";
119119
} else if (error.code == GADErrorInvalidArgument) {
120120
code = @"invalid-argument";
121-
} else if (error.code == GADErrorReceivedInvalidResponse) {
122-
code = @"received-invalid-response";
123-
} else if (error.code == GADErrorMediationNoFill) {
124-
code = @"mediation-no-fill";
121+
} else if (error.code == GADErrorReceivedInvalidAdString) {
122+
code = @"received-invalid-ad-string";
125123
} else if (error.code == GADErrorAdAlreadyUsed) {
126124
code = @"ad-already-used";
127125
} else if (error.code == GADErrorApplicationIdentifierMissing) {

ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ - (void)setRequestConfiguration:(NSDictionary *)requestConfiguration
146146
if (requestConfiguration[@"testDeviceIdentifiers"]) {
147147
NSMutableArray *devices = [@[] mutableCopy];
148148
for (NSString *key in requestConfiguration[@"testDeviceIdentifiers"]) {
149-
if ([key isEqualToString:@"EMULATOR"]) {
150-
[devices addObject:GADSimulatorID];
151-
} else {
152-
[devices addObject:key];
153-
}
149+
[devices addObject:key];
154150
}
155151
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = devices;
156152
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
],
4444
"sdkVersions": {
4545
"ios": {
46-
"googleMobileAds": "11.13.0",
46+
"googleMobileAds": "12.0.0",
4747
"googleUmp": "2.7.0"
4848
},
4949
"android": {

src/types/RequestOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export interface RequestOptions {
7474
/**
7575
* key-value pairs used for custom targeting
7676
*
77-
* Takes an object of keys with values of string or array of strings.
77+
* Takes an object of keys with values of string, number, or arrays of strings/numbers.
7878
*/
79-
customTargeting?: { [key: string]: string | string[] };
79+
customTargeting?: Record<string, string | number | (string | number)[]>;
8080

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

0 commit comments

Comments
 (0)