emi-indo-cordova-plugin-admob 1.9.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin.xml +8 -1
- package/src/ios/emiAdmobPlugin.m +18 -15
package/package.json
CHANGED
package/plugin.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
2
2
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
-
id="emi-indo-cordova-plugin-admob" version="
|
3
|
+
id="emi-indo-cordova-plugin-admob" version="2.0.0">
|
4
4
|
|
5
5
|
<name>emiAdmobPlugin</name>
|
6
6
|
<description>Cordova/Quasar/Capacitor Plugin Admob Android IOS</description>
|
@@ -74,6 +74,13 @@
|
|
74
74
|
<preference name="ANDROID_X" default="1.2.0" />
|
75
75
|
<framework src="androidx.preference:preference:$ANDROID_X" />
|
76
76
|
|
77
|
+
<preference name="MULTI_WINDOW" default="false" />
|
78
|
+
|
79
|
+
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
|
80
|
+
<activity android:resizeableActivity="$MULTI_WINDOW" />
|
81
|
+
</edit-config>
|
82
|
+
|
83
|
+
|
77
84
|
|
78
85
|
<config-file parent="/*" target="AndroidManifest.xml" />
|
79
86
|
<source-file src="src/android/emiAdmobPlugin.kt" target-dir="app/src/main/kotlin/emi/indo/cordova/plugin/admob" />
|
package/src/ios/emiAdmobPlugin.m
CHANGED
@@ -504,6 +504,7 @@ BOOL isUsingAdManagerRequest = YES;
|
|
504
504
|
}
|
505
505
|
|
506
506
|
[self setAdRequest];
|
507
|
+
|
507
508
|
|
508
509
|
self.bannerViewLayout = [[UIView alloc] initWithFrame:CGRectZero];
|
509
510
|
self.bannerViewLayout.translatesAutoresizingMaskIntoConstraints = NO;
|
@@ -809,11 +810,12 @@ BOOL isUsingAdManagerRequest = YES;
|
|
809
810
|
NSString *adUnitId = strongSelf.appOpenAd.adUnitID;
|
810
811
|
|
811
812
|
NSDictionary *data = @{
|
812
|
-
@"value": adValue,
|
813
|
-
@"currencyCode": currencyCode,
|
813
|
+
@"value": adValue ?: [NSNull null],
|
814
|
+
@"currencyCode": currencyCode ?: @"",
|
814
815
|
@"precision": @(precision),
|
815
|
-
@"adUnitId": adUnitId
|
816
|
+
@"adUnitId": adUnitId ?: @""
|
816
817
|
};
|
818
|
+
|
817
819
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:0 error:nil];
|
818
820
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
819
821
|
|
@@ -937,11 +939,12 @@ BOOL isUsingAdManagerRequest = YES;
|
|
937
939
|
NSString *adUnitId = strongSelf.interstitial.adUnitID;
|
938
940
|
|
939
941
|
NSDictionary *data = @{
|
940
|
-
@"value": adValue,
|
941
|
-
@"currencyCode": currencyCode,
|
942
|
+
@"value": adValue ?: [NSNull null],
|
943
|
+
@"currencyCode": currencyCode ?: @"",
|
942
944
|
@"precision": @(precision),
|
943
|
-
@"adUnitId": adUnitId
|
945
|
+
@"adUnitId": adUnitId ?: @""
|
944
946
|
};
|
947
|
+
|
945
948
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:0 error:nil];
|
946
949
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
947
950
|
|
@@ -1072,10 +1075,10 @@ BOOL isUsingAdManagerRequest = YES;
|
|
1072
1075
|
NSString *adUnitId = strongSelf.rewardedInterstitialAd.adUnitID;
|
1073
1076
|
|
1074
1077
|
NSDictionary *data = @{
|
1075
|
-
@"value": adValue,
|
1076
|
-
@"currencyCode": currencyCode,
|
1078
|
+
@"value": adValue ?: [NSNull null],
|
1079
|
+
@"currencyCode": currencyCode ?: @"",
|
1077
1080
|
@"precision": @(precision),
|
1078
|
-
@"adUnitId": adUnitId
|
1081
|
+
@"adUnitId": adUnitId ?: @""
|
1079
1082
|
};
|
1080
1083
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:0 error:nil];
|
1081
1084
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
@@ -1229,10 +1232,10 @@ BOOL isUsingAdManagerRequest = YES;
|
|
1229
1232
|
NSString *adUnitId = strongSelf.rewardedAd.adUnitID;
|
1230
1233
|
|
1231
1234
|
NSDictionary *data = @{
|
1232
|
-
@"value": adValue,
|
1233
|
-
@"currencyCode": currencyCode,
|
1235
|
+
@"value": adValue ?: [NSNull null],
|
1236
|
+
@"currencyCode": currencyCode ?: @"",
|
1234
1237
|
@"precision": @(precision),
|
1235
|
-
@"adUnitId": adUnitId
|
1238
|
+
@"adUnitId": adUnitId ?: @""
|
1236
1239
|
};
|
1237
1240
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:0 error:nil];
|
1238
1241
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
@@ -1480,10 +1483,10 @@ BOOL isUsingAdManagerRequest = YES;
|
|
1480
1483
|
NSString *adUnitId = strongSelf.bannerView.adUnitID;
|
1481
1484
|
|
1482
1485
|
NSDictionary *data = @{
|
1483
|
-
@"value": adValue,
|
1484
|
-
@"currencyCode": currencyCode,
|
1486
|
+
@"value": adValue ?: [NSNull null],
|
1487
|
+
@"currencyCode": currencyCode ?: @"",
|
1485
1488
|
@"precision": @(precision),
|
1486
|
-
@"adUnitId": adUnitId
|
1489
|
+
@"adUnitId": adUnitId ?: @""
|
1487
1490
|
};
|
1488
1491
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:0 error:nil];
|
1489
1492
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|