emi-indo-cordova-plugin-admob 1.5.0 → 1.5.1

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.
@@ -54,6 +54,9 @@ WARNING: Failure to follow the issue template guidelines below will result in th
54
54
 
55
55
  **Environment information**
56
56
  <!-- Please supply full details of your development environment including: -->
57
+ - Plugin version
58
+ - `Plugin version: xxxx`
59
+
57
60
  - Cordova CLI version
58
61
  - `cordova -v`
59
62
  - Cordova platform version
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ### Mobile Ads SDK (Android: 23.4.0) [Release Notes:](https://developers.google.com/admob/android/rel-notes)
7
7
 
8
- ### Mobile Ads SDK (IOS: 11.10.0) [Release Notes:](https://developers.google.com/admob/ios/rel-notes)
8
+ ### Mobile Ads SDK (IOS: 11.5.0) [Release Notes:](https://developers.google.com/admob/ios/rel-notes)
9
9
 
10
10
  ### User Messaging Platform (UMP: 3.0.0) [Release Notes:](https://developers.google.com/admob/android/privacy/release-notes)
11
11
  ### IAB Europe Transparency & Consent Framework (CPM: 2.2.0)
@@ -17,11 +17,14 @@
17
17
  - cordova-android version = 12.0.0
18
18
  - cordova-ios version = 7.0.0
19
19
 
20
+ > [!WARNING]
21
+ > - Minimum supported Xcode version to 14.3
22
+ > - Maximum supported Xcode version up to 15.2
20
23
  ## Minimum macOS | Xcode, and others
21
24
  - Monterey
22
- - Xcode 14.1 or higher
25
+ - Xcode min 14.3 > max 15.2
23
26
  - Command Line Tools 14.1 or higher
24
- - Target iOS 11.0 or higher
27
+ - Target iOS 12.0
25
28
  https://developers.google.com/admob/ios/quick-start
26
29
 
27
30
  <details>
@@ -59,7 +62,9 @@ https://developers.google.com/admob/ios/quick-start
59
62
  [![Video](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCMj8HrgSvO8WYm8wjv5KsM1CCmcX-w472iRZ0ynW715Pj0hMrTlCDLYxhLHme3oFowVW9ap7pQZqosXBDWWQ_SMuqw2g_Beh1CX0igO7jY7KCvBCXbQCqyFekgI9bKIl92opoucOkXbqsgRhBTeB41ho5l_0tx-YVfKt9jrbONt_nv080beeaYOmoN4w7/s320/mq3%20%281%29.webp)](https://youtu.be/YYMJuf7gIsg)
60
63
 
61
64
 
65
+ ## VIDEO Test Collapsible banner autoResize with Xcode/IOS
62
66
 
67
+ [![Video](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLhjgjUkLSlagAcfz_0KwNXLLfvZnkrs8YG4PAUo9y5e0kyTDwUYAHATmWzyF0ZkJ7EWCsvsJIhP-rIDPnAMrrQKkmuZxM38lW4JIzzfb0LZWTh0q9FCbEPEZBjbgkZbzsFlI23Y30uTPR-TEiVpt9w5gFUQXrep0_Tlyj_koRJUhc66zxE2UUJPsejEE/s320/mq2.webp)](https://youtu.be/sLXHKdU6DAg)
63
68
 
64
69
 
65
70
 
@@ -247,11 +252,11 @@ document.addEventListener('on.TCString.expired', () => {
247
252
 
248
253
 
249
254
  - [AppTrackingTransparency (ATT) framework:](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus)
250
- - [Consent Management Platform API:](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details)
255
+ - [Consent Management Platform API:](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details)
251
256
 
252
- - [Example Get Consent Status:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/consent.html) index.html
253
- - [Example requestIDFA:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/requestIDFA.html) index.html
254
- - [Example IABTFC:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/IABTFC.html) index.html
257
+ - [Example Get Consent Status:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/consent.html) index.html (Not yet updated)
258
+ - [Example requestIDFA:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/requestIDFA.html) index.html (Not yet updated)
259
+ - [Example IABTFC:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/IABTFC.html) index.html (Not yet updated)
255
260
 
256
261
 
257
262
 
@@ -422,6 +427,7 @@ document.addEventListener('on.appOpenAd.loaded', () => {
422
427
  <details>
423
428
  <summary>Methods:</summary>
424
429
  <pre>
430
+ cordova.plugins.emiAdmobPlugin.styleBannerAd({ padding: 50, margins: 50 }); // (Optional)
425
431
  cordova.plugins.emiAdmobPlugin.loadBannerAd({config});
426
432
  cordova.plugins.emiAdmobPlugin.showBannerAd(); // default
427
433
  cordova.plugins.emiAdmobPlugin.hideBannerAd(); // default
@@ -593,8 +599,8 @@ example
593
599
  /*
594
600
  previous example
595
601
  [ adUnitId = Interstitial_ID, autoShow = true ] // Deprecated
596
- New
597
- { adUnitId: Interstitial_ID, autoShow: true }
602
+
603
+ { adUnitId: Interstitial_ID, autoShow: true } // NEW
598
604
  */
599
605
  cordova.plugins.emiAdmobPlugin.loadInterstitialAd({ adUnitId: "ca-app-pub-3940256099942544/1033173712", autoShow: true });
600
606
  ```
@@ -807,6 +813,168 @@ document.addEventListener('on.rewarded.dismissed', () => {
807
813
 
808
814
 
809
815
 
816
+ ## New Method (Only Android)
817
+ ### Ad Request Control
818
+ > [!WARNING]
819
+ > - isUsingAdManagerRequest: true
820
+ > - Must run before ad load
821
+
822
+ - cordova.plugins.emiAdmobPlugin.targetingAdRequest({configAdRequest});
823
+ - cordova.plugins.emiAdmobPlugin.setPersonalizationState({config});
824
+ - cordova.plugins.emiAdmobPlugin.setPPS({config});
825
+
826
+ <details>
827
+ <summary>targetingAdRequest</summary>
828
+ <pre>
829
+
830
+
831
+ // Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
832
+
833
+ ```
834
+ const configAdRequest = {
835
+
836
+ // enabled, disabled
837
+ customTargetingEnabled: false,
838
+ categoryExclusionsEnabled: false,
839
+ ppIdEnabled: false,
840
+ contentURLEnabled: false,
841
+ brandSafetyEnabled: false,
842
+
843
+ // set Value
844
+ customTargetingValue: ["24", "25", "26"], // age
845
+ categoryExclusionsValue: "automobile", // automobile or boat
846
+ ppIdValue: "AB123456789",
847
+ contentURLValue: "https://www.example.com",
848
+ brandSafetyArr: ["https://www.mycontenturl1.com", "https://www.mycontenturl2.com"],
849
+
850
+ }
851
+
852
+ cordova.plugins.emiAdmobPlugin.targetingAdRequest(configAdRequest);
853
+ ```
854
+
855
+ </pre>
856
+ </details>
857
+
858
+
859
+
860
+
861
+ <details>
862
+ <summary>setPersonalizationState</summary>
863
+ <pre>
864
+
865
+ // Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
866
+
867
+ cordova.plugins.emiAdmobPlugin.setPersonalizationState({
868
+
869
+ setPersonalizationState: "disabled" // type string: disabled | enabled
870
+
871
+ });
872
+
873
+ </pre>
874
+ </details>
875
+
876
+
877
+
878
+
879
+ <details>
880
+ <summary>setPPS</summary>
881
+ <pre>
882
+
883
+ // Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
884
+
885
+ ```
886
+ cordova.plugins.emiAdmobPlugin.setPPS({
887
+
888
+ ppsEnabled: false, // enabled, disabled
889
+ iabContent: "IAB_AUDIENCE_1_1", // Type string value: IAB_AUDIENCE_1_1 or IAB_CONTENT_2_2
890
+ ppsArrValue: [6,284], // type arr
891
+
892
+ });
893
+
894
+ ```
895
+
896
+ </pre>
897
+ </details>
898
+
899
+
900
+ <details>
901
+ <summary>Example:</summary>
902
+ <pre>
903
+
904
+ // Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
905
+
906
+ ```
907
+ function callSetPPS(){
908
+
909
+ cordova.plugins.emiAdmobPlugin.setPPS({
910
+
911
+ ppsEnabled: true, // enabled, disabled
912
+ iabContent: "IAB_AUDIENCE_1_1", // Type string value: IAB_AUDIENCE_1_1 or IAB_CONTENT_2_2
913
+ ppsArrValue: [6,284], // type arr
914
+
915
+ });
916
+
917
+ }
918
+
919
+ if (callSetPPS()){
920
+
921
+ cordova.plugins.emiAdmobPlugin.loadRewardedAd({ adUnitId: Rewarded_ID, autoShow: true });
922
+
923
+ }
924
+
925
+ ```
926
+
927
+
928
+
929
+
930
+
931
+ </pre>
932
+ </details>
933
+
934
+
935
+
936
+
937
+ ## New Method (Only IOS)
938
+ - You will see higher earnings.
939
+ > [!NOTE]
940
+ > - Is forcing the consent form to be displayed against admob policy? (I DON'T KNOW)
941
+ >
942
+ <details>
943
+ <summary>Method:</summary>
944
+ <pre>
945
+
946
+ /*
947
+
948
+ Sometimes the consent form in IOS is difficult to display,
949
+ because ATT has been set by the user,
950
+ The problem is TCString null,
951
+ causing very few admob ads to load,
952
+ This method will force the consent form to be displayed, whatever the user's decision TCString will not be null.
953
+
954
+ */
955
+ ```
956
+ // Use your own logic, this is just an example
957
+
958
+ let userGdpr = null; // global Variable
959
+ let userTCString = null; // global Variable
960
+
961
+ document.addEventListener('on.sdkInitialization', (data) => {
962
+ userGdpr = data.gdprApplies;
963
+ userTCString = data.consentTCString;
964
+ });
965
+
966
+
967
+ if (userGdpr === 1 && userTCString === null){
968
+
969
+ cordova.plugins.emiAdmobPlugin.forceDisplayPrivacyForm();
970
+
971
+ }
972
+ ```
973
+
974
+ </pre>
975
+ </details>
976
+
977
+
810
978
 
811
979
 
812
980
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emi-indo-cordova-plugin-admob",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Cordova Plugin Admob Android IOS",
5
5
  "cordova": {
6
6
  "id": "emi-indo-cordova-plugin-admob",
@@ -17,6 +17,7 @@
17
17
  "cordova-plugin-admob",
18
18
  "cordova-admob-free",
19
19
  "cordova-admob-plus",
20
+ "admob-plus-cordova",
20
21
  "cordova-admob-pro",
21
22
  "cordova-admob-ios",
22
23
  "cordova-admob-android"
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="1.5.0">
3
+ id="emi-indo-cordova-plugin-admob" version="1.5.1">
4
4
 
5
5
  <name>emiAdmobPlugin</name>
6
6
  <description>Cordova Plugin Admob Android IOS</description>
@@ -88,6 +88,11 @@
88
88
  </feature>
89
89
  </config-file>
90
90
 
91
+ <config-file parent="/*" target="config.xml">
92
+ <preference name="deployment-target" value="12.0" />
93
+ <preference name="SwiftVersion" value="5.3" />
94
+ </config-file>
95
+
91
96
  <preference name="USAGE"
92
97
  default="This identifier will be used to deliver personalized ads to you." />
93
98
 
@@ -115,10 +120,6 @@
115
120
  <key>SKAdNetworkIdentifier</key>
116
121
  <string>4fzdc2evr5.skadnetwork</string>
117
122
  </dict>
118
- <dict>
119
- <key>SKAdNetworkIdentifier</key>
120
- <string>4pfyvq9l8r.skadnetwork</string>
121
- </dict>
122
123
  <dict>
123
124
  <key>SKAdNetworkIdentifier</key>
124
125
  <string>2fnua5tdw4.skadnetwork</string>
@@ -127,10 +128,6 @@
127
128
  <key>SKAdNetworkIdentifier</key>
128
129
  <string>ydx93a7ass.skadnetwork</string>
129
130
  </dict>
130
- <dict>
131
- <key>SKAdNetworkIdentifier</key>
132
- <string>5a6flpkh64.skadnetwork</string>
133
- </dict>
134
131
  <dict>
135
132
  <key>SKAdNetworkIdentifier</key>
136
133
  <string>p78axxw29g.skadnetwork</string>
@@ -165,11 +162,11 @@
165
162
  </dict>
166
163
  <dict>
167
164
  <key>SKAdNetworkIdentifier</key>
168
- <string>f38h382jlk.skadnetwork</string>
165
+ <string>hs6bdukanm.skadnetwork</string>
169
166
  </dict>
170
167
  <dict>
171
168
  <key>SKAdNetworkIdentifier</key>
172
- <string>hs6bdukanm.skadnetwork</string>
169
+ <string>mlmmfzh3r3.skadnetwork</string>
173
170
  </dict>
174
171
  <dict>
175
172
  <key>SKAdNetworkIdentifier</key>
@@ -181,11 +178,11 @@
181
178
  </dict>
182
179
  <dict>
183
180
  <key>SKAdNetworkIdentifier</key>
184
- <string>yclnxrl5pm.skadnetwork</string>
181
+ <string>su67r6k2v3.skadnetwork</string>
185
182
  </dict>
186
183
  <dict>
187
184
  <key>SKAdNetworkIdentifier</key>
188
- <string>t38b2kh725.skadnetwork</string>
185
+ <string>yclnxrl5pm.skadnetwork</string>
189
186
  </dict>
190
187
  <dict>
191
188
  <key>SKAdNetworkIdentifier</key>
@@ -203,10 +200,6 @@
203
200
  <key>SKAdNetworkIdentifier</key>
204
201
  <string>y5ghdn5j9k.skadnetwork</string>
205
202
  </dict>
206
- <dict>
207
- <key>SKAdNetworkIdentifier</key>
208
- <string>n6fk4nfna4.skadnetwork</string>
209
- </dict>
210
203
  <dict>
211
204
  <key>SKAdNetworkIdentifier</key>
212
205
  <string>v9wttpbfk9.skadnetwork</string>
@@ -227,10 +220,6 @@
227
220
  <key>SKAdNetworkIdentifier</key>
228
221
  <string>9t245vhmpl.skadnetwork</string>
229
222
  </dict>
230
- <dict>
231
- <key>SKAdNetworkIdentifier</key>
232
- <string>eh6m2bh4zr.skadnetwork</string>
233
- </dict>
234
223
  <dict>
235
224
  <key>SKAdNetworkIdentifier</key>
236
225
  <string>a2p9lx4jpn.skadnetwork</string>
@@ -251,18 +240,10 @@
251
240
  <key>SKAdNetworkIdentifier</key>
252
241
  <string>8s468mfl3y.skadnetwork</string>
253
242
  </dict>
254
- <dict>
255
- <key>SKAdNetworkIdentifier</key>
256
- <string>klf5c3l5u5.skadnetwork</string>
257
- </dict>
258
243
  <dict>
259
244
  <key>SKAdNetworkIdentifier</key>
260
245
  <string>ppxm28t8ap.skadnetwork</string>
261
246
  </dict>
262
- <dict>
263
- <key>SKAdNetworkIdentifier</key>
264
- <string>ecpz2srf59.skadnetwork</string>
265
- </dict>
266
247
  <dict>
267
248
  <key>SKAdNetworkIdentifier</key>
268
249
  <string>uw77j35x4d.skadnetwork</string>
@@ -271,10 +252,6 @@
271
252
  <key>SKAdNetworkIdentifier</key>
272
253
  <string>pwa73g5rt2.skadnetwork</string>
273
254
  </dict>
274
- <dict>
275
- <key>SKAdNetworkIdentifier</key>
276
- <string>mlmmfzh3r3.skadnetwork</string>
277
- </dict>
278
255
  <dict>
279
256
  <key>SKAdNetworkIdentifier</key>
280
257
  <string>578prtvx9j.skadnetwork</string>
@@ -285,15 +262,15 @@
285
262
  </dict>
286
263
  <dict>
287
264
  <key>SKAdNetworkIdentifier</key>
288
- <string>e5fvkxwrpn.skadnetwork</string>
265
+ <string>tl55sbb4fm.skadnetwork</string>
289
266
  </dict>
290
267
  <dict>
291
268
  <key>SKAdNetworkIdentifier</key>
292
- <string>8c4e2ghe7u.skadnetwork</string>
269
+ <string>e5fvkxwrpn.skadnetwork</string>
293
270
  </dict>
294
271
  <dict>
295
272
  <key>SKAdNetworkIdentifier</key>
296
- <string>zq492l623r.skadnetwork</string>
273
+ <string>8c4e2ghe7u.skadnetwork</string>
297
274
  </dict>
298
275
  <dict>
299
276
  <key>SKAdNetworkIdentifier</key>
@@ -317,7 +294,8 @@
317
294
  <source url="https://cdn.cocoapods.org/" />
318
295
  </config>
319
296
  <pods use-frameworks="true">
320
- <pod name="Google-Mobile-Ads-SDK" spec="~> 11.10.0" />
297
+ <!-- Next release spec="~> 11.10.0" min xcode 15.3 -->
298
+ <pod name="Google-Mobile-Ads-SDK" spec="~> 11.5.0" />
321
299
  </pods>
322
300
  </podspec>
323
301
 
@@ -2,6 +2,7 @@
2
2
  #import <Cordova/CDVPlugin.h>
3
3
  #import <GoogleMobileAds/GoogleMobileAds.h>
4
4
  #import <UserMessagingPlatform/UserMessagingPlatform.h>
5
+ #import <CommonCrypto/CommonDigest.h>
5
6
  @interface emiAdmobPlugin : CDVPlugin<GADBannerViewDelegate, GADFullScreenContentDelegate>{}
6
7
  @property(nonatomic, strong) GADAppOpenAd *appOpenAd;
7
8
  @property(nonatomic, strong) GADBannerView *bannerView;
@@ -11,10 +12,16 @@
11
12
  @property(nonatomic, readonly) BOOL isPrivacyOptionsRequired;
12
13
  @property(nonatomic, strong) CDVInvokedUrlCommand *command;
13
14
  @property(nonatomic, strong) GADResponseInfo *responseInfo;
15
+ @property(nonatomic, readonly) BOOL canRequestAds;
16
+ @property (nonatomic, assign) BOOL isUsingAdManagerRequest;
17
+ @property (nonatomic, assign) CGFloat viewWidth;
18
+ @property (nonatomic, strong) UIView *bannerViewLayout;
19
+
14
20
  - (void)initialize:(CDVInvokedUrlCommand *)command;
15
21
  - (void)requestIDFA:(CDVInvokedUrlCommand *)command;
16
22
  - (void)showPrivacyOptionsForm:(CDVInvokedUrlCommand *)command;
17
23
  - (void)getConsentRequest:(CDVInvokedUrlCommand *)command;
24
+ - (void)forceDisplayPrivacyForm:(CDVInvokedUrlCommand *)command;
18
25
  - (void)consentReset:(CDVInvokedUrlCommand *)command;
19
26
  - (void)getIabTfc:(CDVInvokedUrlCommand *)command;
20
27
  - (void)loadAppOpenAd:(CDVInvokedUrlCommand *)command;
@@ -31,5 +38,3 @@
31
38
  - (void)showRewardedAd:(CDVInvokedUrlCommand *)command;
32
39
  - (void) fireEvent:(NSString *)obj event:(NSString *)eventName withData:(NSString *)jsonStr;
33
40
  @end
34
-
35
-