cordova-admob-tomitank 1.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.
Files changed (114) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +17 -0
  3. package/esm/admob.d.ts +3 -0
  4. package/esm/admob.js +22 -0
  5. package/esm/admob.js.map +1 -0
  6. package/esm/api.d.ts +61 -0
  7. package/esm/api.js +232 -0
  8. package/esm/api.js.map +1 -0
  9. package/esm/app-open.d.ts +17 -0
  10. package/esm/app-open.js +83 -0
  11. package/esm/app-open.js.map +1 -0
  12. package/esm/banner.d.ts +33 -0
  13. package/esm/banner.js +143 -0
  14. package/esm/banner.js.map +1 -0
  15. package/esm/generated.d.ts +77 -0
  16. package/esm/generated.js +104 -0
  17. package/esm/generated.js.map +1 -0
  18. package/esm/index.d.ts +31 -0
  19. package/esm/index.js +95 -0
  20. package/esm/index.js.map +1 -0
  21. package/esm/interstitial.d.ts +7 -0
  22. package/esm/interstitial.js +35 -0
  23. package/esm/interstitial.js.map +1 -0
  24. package/esm/native.d.ts +19 -0
  25. package/esm/native.js +134 -0
  26. package/esm/native.js.map +1 -0
  27. package/esm/rewarded-interstitial.d.ts +10 -0
  28. package/esm/rewarded-interstitial.js +35 -0
  29. package/esm/rewarded-interstitial.js.map +1 -0
  30. package/esm/rewarded.d.ts +14 -0
  31. package/esm/rewarded.js +35 -0
  32. package/esm/rewarded.js.map +1 -0
  33. package/esm/shared.d.ts +2 -0
  34. package/esm/shared.js +3 -0
  35. package/esm/shared.js.map +1 -0
  36. package/lib/admob.d.ts +3 -0
  37. package/lib/admob.js +50 -0
  38. package/lib/admob.js.map +1 -0
  39. package/lib/api.d.ts +61 -0
  40. package/lib/api.js +240 -0
  41. package/lib/api.js.map +1 -0
  42. package/lib/app-open.d.ts +17 -0
  43. package/lib/app-open.js +85 -0
  44. package/lib/app-open.js.map +1 -0
  45. package/lib/banner.d.ts +33 -0
  46. package/lib/banner.js +145 -0
  47. package/lib/banner.js.map +1 -0
  48. package/lib/generated.d.ts +77 -0
  49. package/lib/generated.js +110 -0
  50. package/lib/generated.js.map +1 -0
  51. package/lib/index.d.ts +31 -0
  52. package/lib/index.js +120 -0
  53. package/lib/index.js.map +1 -0
  54. package/lib/interstitial.d.ts +7 -0
  55. package/lib/interstitial.js +37 -0
  56. package/lib/interstitial.js.map +1 -0
  57. package/lib/native.d.ts +19 -0
  58. package/lib/native.js +136 -0
  59. package/lib/native.js.map +1 -0
  60. package/lib/rewarded-interstitial.d.ts +10 -0
  61. package/lib/rewarded-interstitial.js +37 -0
  62. package/lib/rewarded-interstitial.js.map +1 -0
  63. package/lib/rewarded.d.ts +14 -0
  64. package/lib/rewarded.js +37 -0
  65. package/lib/rewarded.js.map +1 -0
  66. package/lib/shared.d.ts +2 -0
  67. package/lib/shared.js +19 -0
  68. package/lib/shared.js.map +1 -0
  69. package/package.json +73 -0
  70. package/plugin.xml +333 -0
  71. package/scripts/iosNSAppTransportSecurity.js +29 -0
  72. package/scripts/iosNSAppTransportSecurity.ts +33 -0
  73. package/scripts/tsconfig.json +5 -0
  74. package/scripts/util.js +34 -0
  75. package/scripts/util.ts +44 -0
  76. package/src/android/cordova/AdMob.java +256 -0
  77. package/src/android/cordova/ExecuteContext.java +174 -0
  78. package/src/android/cordova/Generated.java +72 -0
  79. package/src/android/cordova/ads/AdBase.java +54 -0
  80. package/src/android/cordova/ads/AppOpen.java +98 -0
  81. package/src/android/cordova/ads/Banner.java +370 -0
  82. package/src/android/cordova/ads/Interstitial.java +101 -0
  83. package/src/android/cordova/ads/Native.java +162 -0
  84. package/src/android/cordova/ads/Rewarded.java +108 -0
  85. package/src/android/cordova/ads/RewardedInterstitial.java +108 -0
  86. package/src/android/core/Ad.java +73 -0
  87. package/src/android/core/Context.java +186 -0
  88. package/src/android/core/GenericAd.java +22 -0
  89. package/src/android/core/Helper.java +134 -0
  90. package/src/browser/AdMobProxy.js +33 -0
  91. package/src/ios/AMBAdBase.swift +72 -0
  92. package/src/ios/AMBAppOpenAd.swift +87 -0
  93. package/src/ios/AMBBanner.swift +294 -0
  94. package/src/ios/AMBContext.swift +166 -0
  95. package/src/ios/AMBCore.swift +232 -0
  96. package/src/ios/AMBGenerated.swift +45 -0
  97. package/src/ios/AMBInterstitial.swift +69 -0
  98. package/src/ios/AMBNativeAd.swift +128 -0
  99. package/src/ios/AMBPlugin.swift +198 -0
  100. package/src/ios/AMBRewarded.swift +72 -0
  101. package/src/ios/AMBRewardedInterstitial.swift +72 -0
  102. package/src/www/admob.ts +26 -0
  103. package/src/www/api.ts +156 -0
  104. package/src/www/app-open.ts +27 -0
  105. package/src/www/banner.ts +102 -0
  106. package/src/www/cordova.d.ts +9 -0
  107. package/src/www/generated.ts +125 -0
  108. package/src/www/index.ts +88 -0
  109. package/src/www/interstitial.ts +17 -0
  110. package/src/www/native.ts +54 -0
  111. package/src/www/rewarded-interstitial.ts +20 -0
  112. package/src/www/rewarded.ts +26 -0
  113. package/src/www/shared.ts +2 -0
  114. package/www/admob.js +675 -0
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var shared_1 = require("./shared");
19
+ var RewardedAd = /** @class */ (function (_super) {
20
+ __extends(RewardedAd, _super);
21
+ function RewardedAd() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ RewardedAd.prototype.isLoaded = function () {
25
+ return _super.prototype.isLoaded.call(this);
26
+ };
27
+ RewardedAd.prototype.load = function () {
28
+ return _super.prototype.load.call(this);
29
+ };
30
+ RewardedAd.prototype.show = function () {
31
+ return _super.prototype.show.call(this);
32
+ };
33
+ RewardedAd.cls = 'RewardedAd';
34
+ return RewardedAd;
35
+ }(shared_1.MobileAd));
36
+ exports.default = RewardedAd;
37
+ //# sourceMappingURL=rewarded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rewarded.js","sourceRoot":"","sources":["../src/www/rewarded.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAoD;AAWpD;IAAwC,8BAA2B;IAAnE;;IAcA,CAAC;IAXQ,6BAAQ,GAAf;QACE,OAAO,iBAAM,QAAQ,WAAE,CAAA;IACzB,CAAC;IAEM,yBAAI,GAAX;QACE,OAAO,iBAAM,IAAI,WAAE,CAAA;IACrB,CAAC;IAEM,yBAAI,GAAX;QACE,OAAO,iBAAM,IAAI,WAAE,CAAA;IACrB,CAAC;IAZM,cAAG,GAAG,YAAY,CAAA;IAa3B,iBAAC;CAAA,AAdD,CAAwC,iBAAQ,GAc/C;kBAdoB,UAAU"}
@@ -0,0 +1,2 @@
1
+ export * from './api';
2
+ export * from './generated';
package/lib/shared.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api"), exports);
18
+ __exportStar(require("./generated"), exports);
19
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/www/shared.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,8CAA2B"}
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "cordova-admob-tomitank",
3
+ "version": "1.0.0",
4
+ "description": "Trustable Google AdMob Cordova Plugin",
5
+ "main": "lib/index.js",
6
+ "module": "esm/index.js",
7
+ "typings": "esm/index.d.ts",
8
+ "scripts": {
9
+ "build": "nx build",
10
+ "prepublishOnly": "nx build",
11
+ "version": "npx cordova-plus plugin version",
12
+ "test": "cordova-plus plugin test"
13
+ },
14
+ "dependencies": {
15
+ "fast-glob": "^3.2.11",
16
+ "fs-extra": "^10.1.0",
17
+ "plist": "^3.0.6",
18
+ "replace-in-file": "^6.3.5"
19
+ },
20
+ "devDependencies": {
21
+ "@admob-tomitank-internal/rollup-config": "file:internal/rollup-config",
22
+ "@tsconfig/node10": "^1.0.9",
23
+ "@types/cordova": "^0.0.34",
24
+ "@types/fs-extra": "^11.0.1",
25
+ "@types/plist": "^3.0.2",
26
+ "cordova": "11.0.0",
27
+ "cordova-plus": "^0.7.0",
28
+ "cordova-ts-hook": "^0.0.3",
29
+ "nx": "16.1.4",
30
+ "nx-cloud": "latest",
31
+ "rollup": "^2.78.0",
32
+ "typescript": "~4.7.4",
33
+ "tslib": "^2.5.0"
34
+ },
35
+ "author": "tomitank",
36
+ "license": "MIT",
37
+ "repository": "tomitank/cordova-admob-tomitank",
38
+ "homepage": "https://admob-plus.github.io/docs/cordova",
39
+ "funding": "https://github.com/sponsors/tomitank",
40
+ "files": [
41
+ "*.ts",
42
+ "*.md",
43
+ "*.xml",
44
+ "esm",
45
+ "lib",
46
+ "scripts",
47
+ "src",
48
+ "ts",
49
+ "www",
50
+ "!**/*.tsbuildinfo"
51
+ ],
52
+ "keywords": [
53
+ "cordova",
54
+ "admob",
55
+ "plugin",
56
+ "tomitank",
57
+ "ecosystem:cordova",
58
+ "cordova-android",
59
+ "cordova-ios",
60
+ "monetization",
61
+ "typescript"
62
+ ],
63
+ "cordova": {
64
+ "id": "cordova-admob-tomitank",
65
+ "platforms": [
66
+ "android",
67
+ "ios"
68
+ ]
69
+ },
70
+ "nx": {
71
+ "targets": {}
72
+ }
73
+ }
package/plugin.xml ADDED
@@ -0,0 +1,333 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <plugin id="cordova-admob-tomitank" version="1.0.0"
3
+ xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
+ xmlns:android="http://schemas.android.com/apk/res/android">
5
+ <name>cordova-admob-tomitank</name>
6
+ <js-module name="AdMob" src="www/admob.js">
7
+ <clobbers target="admob" />
8
+ </js-module>
9
+
10
+ <engines>
11
+ <engine name="cordova" version=">=7.0.0" />
12
+ <engine name="cordova-android" version=">=6.0.0" />
13
+ <engine name="cordova-ios" version=">=5.0.0" />
14
+ </engines>
15
+
16
+ <hook type="after_plugin_add" src="scripts/iosNSAppTransportSecurity.js" />
17
+ <hook type="after_plugin_install" src="scripts/iosNSAppTransportSecurity.js" />
18
+ <hook type="after_prepare" src="scripts/iosNSAppTransportSecurity.js" />
19
+ <hook type="before_compile" src="scripts/iosNSAppTransportSecurity.js" />
20
+
21
+ <platform name="android">
22
+ <preference name="APP_ID_ANDROID" default="ca-app-pub-xxx~yyy" />
23
+ <preference name="PLAY_SERVICES_VERSION" default="22.0.0" />
24
+
25
+ <config-file target="AndroidManifest.xml" parent="/manifest/application">
26
+ <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:excludeFromRecents="true" android:name="com.google.android.gms.ads.AdActivity" android:noHistory="true" />
27
+ <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="$APP_ID_ANDROID" />
28
+ <meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true"/>
29
+ </config-file>
30
+
31
+ <config-file target="res/xml/config.xml" parent="/*">
32
+ <feature name="AdMob">
33
+ <param name="android-package" value="admob.plus.cordova.AdMob"/>
34
+ </feature>
35
+ </config-file>
36
+
37
+ <framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />
38
+
39
+ <!-- AUTOGENERATED: ANDROID_BEGIN -->
40
+ <source-file src="src/android/cordova/AdMob.java" target-dir="src/admob/plus/cordova" />
41
+ <source-file src="src/android/cordova/ExecuteContext.java" target-dir="src/admob/plus/cordova" />
42
+ <source-file src="src/android/cordova/Generated.java" target-dir="src/admob/plus/cordova" />
43
+ <source-file src="src/android/cordova/ads/AdBase.java" target-dir="src/admob/plus/cordova/ads" />
44
+ <source-file src="src/android/cordova/ads/AppOpen.java" target-dir="src/admob/plus/cordova/ads" />
45
+ <source-file src="src/android/cordova/ads/Banner.java" target-dir="src/admob/plus/cordova/ads" />
46
+ <source-file src="src/android/cordova/ads/Interstitial.java" target-dir="src/admob/plus/cordova/ads" />
47
+ <source-file src="src/android/cordova/ads/Native.java" target-dir="src/admob/plus/cordova/ads" />
48
+ <source-file src="src/android/cordova/ads/Rewarded.java" target-dir="src/admob/plus/cordova/ads" />
49
+ <source-file src="src/android/cordova/ads/RewardedInterstitial.java" target-dir="src/admob/plus/cordova/ads" />
50
+ <source-file src="src/android/core/Ad.java" target-dir="src/admob/plus/core" />
51
+ <source-file src="src/android/core/Context.java" target-dir="src/admob/plus/core" />
52
+ <source-file src="src/android/core/GenericAd.java" target-dir="src/admob/plus/core" />
53
+ <source-file src="src/android/core/Helper.java" target-dir="src/admob/plus/core" />
54
+ <!-- AUTOGENERATED: ANDROID_END -->
55
+ </platform>
56
+
57
+ <platform name="ios">
58
+ <preference name="APP_ID_IOS" default="ca-app-pub-xxx~yyy" />
59
+ <preference name="USAGE" default="This identifier will be used to deliver personalized ads to you." />
60
+ <preference name="disableSDKCrashReporting" default="false" />
61
+
62
+ <config-file target="config.xml" parent="/*">
63
+ <feature name="AdMob">
64
+ <param name="ios-package" value="AMBPlugin" />
65
+ </feature>
66
+ </config-file>
67
+
68
+ <config-file target="*-Info.plist" parent="GADApplicationIdentifier">
69
+ <string>$APP_ID_IOS</string>
70
+ </config-file>
71
+
72
+ <config-file target="*-Info.plist" parent="GADDelayAppMeasurementInit">
73
+ <true/>
74
+ </config-file>
75
+
76
+ <config-file target="*-Info.plist" parent="NSAppTransportSecurity">
77
+ <dict>
78
+ <key>NSAllowsArbitraryLoads</key>
79
+ <true/>
80
+ <key>NSAllowsArbitraryLoadsForMedia</key>
81
+ <true/>
82
+ <key>NSAllowsArbitraryLoadsInWebContent</key>
83
+ <true/>
84
+ </dict>
85
+ </config-file>
86
+
87
+ <config-file target="*-Info.plist" parent="NSUserTrackingUsageDescription">
88
+ <string>$USAGE</string>
89
+ </config-file>
90
+
91
+ <config-file platform="ios" target="*-Info.plist" parent="SKAdNetworkItems">
92
+ <array>
93
+ <dict>
94
+ <key>SKAdNetworkIdentifier</key>
95
+ <string>cstr6suwn9.skadnetwork</string>
96
+ </dict>
97
+ <dict>
98
+ <key>SKAdNetworkIdentifier</key>
99
+ <string>4fzdc2evr5.skadnetwork</string>
100
+ </dict>
101
+ <dict>
102
+ <key>SKAdNetworkIdentifier</key>
103
+ <string>4pfyvq9l8r.skadnetwork </string>
104
+ </dict>
105
+ <dict>
106
+ <key>SKAdNetworkIdentifier</key>
107
+ <string>2fnua5tdw4.skadnetwork</string>
108
+ </dict>
109
+ <dict>
110
+ <key>SKAdNetworkIdentifier</key>
111
+ <string>ydx93a7ass.skadnetwork</string>
112
+ </dict>
113
+ <dict>
114
+ <key>SKAdNetworkIdentifier</key>
115
+ <string>5a6flpkh64.skadnetwork</string>
116
+ </dict>
117
+ <dict>
118
+ <key>SKAdNetworkIdentifier</key>
119
+ <string>p78axxw29g.skadnetwork</string>
120
+ </dict>
121
+ <dict>
122
+ <key>SKAdNetworkIdentifier</key>
123
+ <string>v72qych5uu.skadnetwork</string>
124
+ </dict>
125
+ <dict>
126
+ <key>SKAdNetworkIdentifier</key>
127
+ <string>ludvb6z3bs.skadnetwork</string>
128
+ </dict>
129
+ <dict>
130
+ <key>SKAdNetworkIdentifier</key>
131
+ <string>cp8zw746q7.skadnetwork</string>
132
+ </dict>
133
+ <dict>
134
+ <key>SKAdNetworkIdentifier</key>
135
+ <string>c6k4g5qg8m.skadnetwork</string>
136
+ </dict>
137
+ <dict>
138
+ <key>SKAdNetworkIdentifier</key>
139
+ <string>s39g8k73mm.skadnetwork</string>
140
+ </dict>
141
+ <dict>
142
+ <key>SKAdNetworkIdentifier</key>
143
+ <string>3qy4746246.skadnetwork</string>
144
+ </dict>
145
+ <dict>
146
+ <key>SKAdNetworkIdentifier</key>
147
+ <string>3sh42y64q3.skadnetwork</string>
148
+ </dict>
149
+ <dict>
150
+ <key>SKAdNetworkIdentifier</key>
151
+ <string>f38h382jlk.skadnetwork</string>
152
+ </dict>
153
+ <dict>
154
+ <key>SKAdNetworkIdentifier</key>
155
+ <string>hs6bdukanm.skadnetwork</string>
156
+ </dict>
157
+ <dict>
158
+ <key>SKAdNetworkIdentifier</key>
159
+ <string>prcb7njmu6.skadnetwork</string>
160
+ </dict>
161
+ <dict>
162
+ <key>SKAdNetworkIdentifier</key>
163
+ <string>v4nxqhlyqp.skadnetwork</string>
164
+ </dict>
165
+ <dict>
166
+ <key>SKAdNetworkIdentifier</key>
167
+ <string>wzmmz9fp6w.skadnetwork</string>
168
+ </dict>
169
+ <dict>
170
+ <key>SKAdNetworkIdentifier</key>
171
+ <string>yclnxrl5pm.skadnetwork</string>
172
+ </dict>
173
+ <dict>
174
+ <key>SKAdNetworkIdentifier</key>
175
+ <string>t38b2kh725.skadnetwork</string>
176
+ </dict>
177
+ <dict>
178
+ <key>SKAdNetworkIdentifier</key>
179
+ <string>7ug5zh24hu.skadnetwork</string>
180
+ </dict>
181
+ <dict>
182
+ <key>SKAdNetworkIdentifier</key>
183
+ <string>9rd848q2bz.skadnetwork</string>
184
+ </dict>
185
+ <dict>
186
+ <key>SKAdNetworkIdentifier</key>
187
+ <string>y5ghdn5j9k.skadnetwork</string>
188
+ </dict>
189
+ <dict>
190
+ <key>SKAdNetworkIdentifier</key>
191
+ <string>n6fk4nfna4.skadnetwork</string>
192
+ </dict>
193
+ <dict>
194
+ <key>SKAdNetworkIdentifier</key>
195
+ <string>v9wttpbfk9.skadnetwork</string>
196
+ </dict>
197
+ <dict>
198
+ <key>SKAdNetworkIdentifier</key>
199
+ <string>n38lu8286q.skadnetwork</string>
200
+ </dict>
201
+ <dict>
202
+ <key>SKAdNetworkIdentifier</key>
203
+ <string>47vhws6wlr.skadnetwork</string>
204
+ </dict>
205
+ <dict>
206
+ <key>SKAdNetworkIdentifier</key>
207
+ <string>kbd757ywx3.skadnetwork</string>
208
+ </dict>
209
+ <dict>
210
+ <key>SKAdNetworkIdentifier</key>
211
+ <string>9t245vhmpl.skadnetwork</string>
212
+ </dict>
213
+ <dict>
214
+ <key>SKAdNetworkIdentifier</key>
215
+ <string>a2p9lx4jpn.skadnetwork</string>
216
+ </dict>
217
+ <dict>
218
+ <key>SKAdNetworkIdentifier</key>
219
+ <string>22mmun2rn5.skadnetwork</string>
220
+ </dict>
221
+ <dict>
222
+ <key>SKAdNetworkIdentifier</key>
223
+ <string>4468km3ulz.skadnetwork</string>
224
+ </dict>
225
+ <dict>
226
+ <key>SKAdNetworkIdentifier</key>
227
+ <string>2u9pt9hc89.skadnetwork</string>
228
+ </dict>
229
+ <dict>
230
+ <key>SKAdNetworkIdentifier</key>
231
+ <string>8s468mfl3y.skadnetwork</string>
232
+ </dict>
233
+ <dict>
234
+ <key>SKAdNetworkIdentifier</key>
235
+ <string>av6w8kgt66.skadnetwork</string>
236
+ </dict>
237
+ <dict>
238
+ <key>SKAdNetworkIdentifier</key>
239
+ <string>klf5c3l5u5.skadnetwork</string>
240
+ </dict>
241
+ <dict>
242
+ <key>SKAdNetworkIdentifier</key>
243
+ <string>ppxm28t8ap.skadnetwork</string>
244
+ </dict>
245
+ <dict>
246
+ <key>SKAdNetworkIdentifier</key>
247
+ <string>424m5254lk.skadnetwork</string>
248
+ </dict>
249
+ <dict>
250
+ <key>SKAdNetworkIdentifier</key>
251
+ <string>ecpz2srf59.skadnetwork</string>
252
+ </dict>
253
+ <dict>
254
+ <key>SKAdNetworkIdentifier</key>
255
+ <string>uw77j35x4d.skadnetwork</string>
256
+ </dict>
257
+ <dict>
258
+ <key>SKAdNetworkIdentifier</key>
259
+ <string>mlmmfzh3r3.skadnetwork</string>
260
+ </dict>
261
+ <dict>
262
+ <key>SKAdNetworkIdentifier</key>
263
+ <string>578prtvx9j.skadnetwork</string>
264
+ </dict>
265
+ <dict>
266
+ <key>SKAdNetworkIdentifier</key>
267
+ <string>4dzt52r2t5.skadnetwork</string>
268
+ </dict>
269
+ <dict>
270
+ <key>SKAdNetworkIdentifier</key>
271
+ <string>gta9lk7p23.skadnetwork</string>
272
+ </dict>
273
+ <dict>
274
+ <key>SKAdNetworkIdentifier</key>
275
+ <string>e5fvkxwrpn.skadnetwork</string>
276
+ </dict>
277
+ <dict>
278
+ <key>SKAdNetworkIdentifier</key>
279
+ <string>8c4e2ghe7u.skadnetwork</string>
280
+ </dict>
281
+ <dict>
282
+ <key>SKAdNetworkIdentifier</key>
283
+ <string>zq492l623r.skadnetwork</string>
284
+ </dict>
285
+ <dict>
286
+ <key>SKAdNetworkIdentifier</key>
287
+ <string>3rd42ekr43.skadnetwork</string>
288
+ </dict>
289
+ <dict>
290
+ <key>SKAdNetworkIdentifier</key>
291
+ <string>3qcr597p9d.skadnetwork</string>
292
+ </dict>
293
+ </array>
294
+ </config-file>
295
+
296
+ <!-- AUTOGENERATED: IOS_BEGIN -->
297
+ <source-file src="src/ios/AMBAdBase.swift" />
298
+ <source-file src="src/ios/AMBAppOpenAd.swift" />
299
+ <source-file src="src/ios/AMBBanner.swift" />
300
+ <source-file src="src/ios/AMBContext.swift" />
301
+ <source-file src="src/ios/AMBCore.swift" />
302
+ <source-file src="src/ios/AMBGenerated.swift" />
303
+ <source-file src="src/ios/AMBInterstitial.swift" />
304
+ <source-file src="src/ios/AMBNativeAd.swift" />
305
+ <source-file src="src/ios/AMBPlugin.swift" />
306
+ <source-file src="src/ios/AMBRewarded.swift" />
307
+ <source-file src="src/ios/AMBRewardedInterstitial.swift" />
308
+ <!-- AUTOGENERATED: IOS_END -->
309
+
310
+ <framework src="AppTrackingTransparency.framework" weak="true" />
311
+
312
+ <podspec>
313
+ <config>
314
+ <source url="https://cdn.cocoapods.org/" />
315
+ </config>
316
+ <pods use-frameworks="true">
317
+ <pod name="Google-Mobile-Ads-SDK" spec="~> 10.3.0" />
318
+ </pods>
319
+ </podspec>
320
+ </platform>
321
+
322
+ <platform name="browser">
323
+ <config-file target="config.xml" parent="/*">
324
+ <feature name="AdMob">
325
+ <param name="browser-package" value="AdMob" />
326
+ </feature>
327
+ </config-file>
328
+
329
+ <js-module src="src/browser/AdMobProxy.js" name="AdMobProxy">
330
+ <runs />
331
+ </js-module>
332
+ </platform>
333
+ </plugin>
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const plist_1 = __importDefault(require("plist"));
6
+ const util_1 = require("./util");
7
+ async function iosSetNSAppTransportSecurity(ctx) {
8
+ await (0, util_1.updateTextFile)(ctx.ios.plistPath, (content) => {
9
+ if (content.indexOf('NSAllowsArbitraryLoadsInWebContent') > -1) {
10
+ return;
11
+ }
12
+ const plistObj = plist_1.default.parse(content);
13
+ Object.assign(plistObj, {
14
+ NSAppTransportSecurity: {
15
+ ...plistObj.NSAppTransportSecurity,
16
+ NSAllowsArbitraryLoads: true,
17
+ NSAllowsArbitraryLoadsForMedia: true,
18
+ NSAllowsArbitraryLoadsInWebContent: true,
19
+ },
20
+ });
21
+ return plist_1.default.build(plistObj);
22
+ });
23
+ }
24
+ module.exports = async (context) => {
25
+ const ctx = await (0, util_1.enhanceContext)(context);
26
+ if (ctx.opts.cordova.platforms.includes('ios')) {
27
+ await iosSetNSAppTransportSecurity(ctx);
28
+ }
29
+ };
@@ -0,0 +1,33 @@
1
+ import type { Context } from 'cordova-ts-hook'
2
+ import plist, { PlistObject } from 'plist'
3
+ import { enhanceContext, EnhancedContext, updateTextFile } from './util'
4
+
5
+ async function iosSetNSAppTransportSecurity(ctx: EnhancedContext) {
6
+ await updateTextFile(ctx.ios!.plistPath, (content) => {
7
+ if (content.indexOf('NSAllowsArbitraryLoadsInWebContent') > -1) {
8
+ return
9
+ }
10
+
11
+ const plistObj = plist.parse(content) as {
12
+ NSAppTransportSecurity: PlistObject
13
+ }
14
+
15
+ Object.assign(plistObj, {
16
+ NSAppTransportSecurity: {
17
+ ...plistObj.NSAppTransportSecurity,
18
+ NSAllowsArbitraryLoads: true,
19
+ NSAllowsArbitraryLoadsForMedia: true,
20
+ NSAllowsArbitraryLoadsInWebContent: true,
21
+ },
22
+ })
23
+
24
+ return plist.build(plistObj)
25
+ })
26
+ }
27
+
28
+ export = async (context: Context) => {
29
+ const ctx = await enhanceContext(context)
30
+ if (ctx.opts.cordova.platforms.includes('ios')) {
31
+ await iosSetNSAppTransportSecurity(ctx)
32
+ }
33
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "@tsconfig/node10",
3
+ "compilerOptions": {},
4
+ "include": ["*.ts"]
5
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.updateTextFile = exports.enhanceContext = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const fast_glob_1 = __importDefault(require("fast-glob"));
9
+ const fs_extra_1 = __importDefault(require("fs-extra"));
10
+ async function enhanceContext(context) {
11
+ const ctx = context;
12
+ const { projectRoot } = context.opts;
13
+ if (context.opts.cordova.platforms.includes('ios')) {
14
+ const plistPath = await (0, fast_glob_1.default)('*/*-Info.plist', {
15
+ cwd: path_1.default.join(projectRoot, 'platforms/ios'),
16
+ onlyFiles: true,
17
+ absolute: true,
18
+ }).then((files) => files[0]);
19
+ ctx.ios = {
20
+ plistPath,
21
+ rootDir: (...args) => path_1.default.join(plistPath, '..', ...args),
22
+ };
23
+ }
24
+ return ctx;
25
+ }
26
+ exports.enhanceContext = enhanceContext;
27
+ async function updateTextFile(filename, update) {
28
+ const content = await fs_extra_1.default.readFile(filename, 'utf8');
29
+ const contextUpdated = update(content);
30
+ if (contextUpdated === undefined || contextUpdated === content)
31
+ return;
32
+ await fs_extra_1.default.writeFile(filename, contextUpdated);
33
+ }
34
+ exports.updateTextFile = updateTextFile;
@@ -0,0 +1,44 @@
1
+ import path from 'path'
2
+ import glob from 'fast-glob'
3
+ import type { Context } from 'cordova-ts-hook'
4
+ import fse from 'fs-extra'
5
+
6
+ export interface EnhancedContext extends Context {
7
+ ios?: {
8
+ plistPath: string
9
+ rootDir: typeof path.join
10
+ }
11
+ }
12
+
13
+ export async function enhanceContext(
14
+ context: Context,
15
+ ): Promise<EnhancedContext> {
16
+ const ctx: EnhancedContext = context
17
+ const { projectRoot } = context.opts
18
+
19
+ if (context.opts.cordova.platforms.includes('ios')) {
20
+ const plistPath = await glob('*/*-Info.plist', {
21
+ cwd: path.join(projectRoot, 'platforms/ios'),
22
+ onlyFiles: true,
23
+ absolute: true,
24
+ }).then((files) => files[0])
25
+
26
+ ctx.ios = {
27
+ plistPath,
28
+ rootDir: (...args) => path.join(plistPath, '..', ...args),
29
+ }
30
+ }
31
+
32
+ return ctx
33
+ }
34
+
35
+ export async function updateTextFile(
36
+ filename: string,
37
+ update: (context: string) => string | undefined,
38
+ ) {
39
+ const content = await fse.readFile(filename, 'utf8')
40
+ const contextUpdated = update(content)
41
+ if (contextUpdated === undefined || contextUpdated === content) return
42
+
43
+ await fse.writeFile(filename, contextUpdated)
44
+ }