@capacitor-community/admob 3.2.0 → 3.3.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/CapacitorCommunityAdmob.podspec +1 -1
- package/LICENSE +1 -1
- package/README.md +23 -30
- package/android/build.gradle +11 -9
- package/dist/plugin.js +1 -1
- package/ios/Plugin/Banner/BannerExecutor.swift +1 -0
- package/package.json +2 -3
- package/ios/Plugin/.DS_Store +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -6,15 +6,12 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/maintenance/yes/
|
|
9
|
+
<img src="https://img.shields.io/maintenance/yes/2022?style=flat-square" />
|
|
10
10
|
<!-- <a href="https://github.com/capacitor-community/example/actions?query=workflow%3A%22CI%22"><img src="https://img.shields.io/github/workflow/status/capacitor-community/example/CI?style=flat-square" /></a> -->
|
|
11
11
|
<a href="https://www.npmjs.com/package/@capacitor-community/admob"><img src="https://img.shields.io/npm/l/@capacitor-community/admob?style=flat-square" /></a>
|
|
12
12
|
<br>
|
|
13
13
|
<a href="https://www.npmjs.com/package/@capacitor-community/admob"><img src="https://img.shields.io/npm/dw/@capacitor-community/admob?style=flat-square" /></a>
|
|
14
14
|
<a href="https://www.npmjs.com/package/@capacitor-community/admob"><img src="https://img.shields.io/npm/v/@capacitor-community/admob?style=flat-square" /></a>
|
|
15
|
-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
16
|
-
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-7-orange?style=flat-square" /></a>
|
|
17
|
-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
18
15
|
</p>
|
|
19
16
|
|
|
20
17
|
## Maintainers
|
|
@@ -26,6 +23,13 @@
|
|
|
26
23
|
|
|
27
24
|
Maintenance Status: Actively Maintained
|
|
28
25
|
|
|
26
|
+
## Contributors ✨
|
|
27
|
+
<a href="https://github.com/capacitor-community/admob/graphs/contributors">
|
|
28
|
+
<img src="https://contrib.rocks/image?repo=capacitor-community/admob" />
|
|
29
|
+
</a>
|
|
30
|
+
|
|
31
|
+
Made with [contributors-img](https://contrib.rocks).
|
|
32
|
+
|
|
29
33
|
## Demo
|
|
30
34
|
|
|
31
35
|
[Demo code is here.](https://github.com/capacitor-community/admob/tree/master/demo)
|
|
@@ -104,6 +108,21 @@ Don't forget to replace `[APP_ID]` by your AdMob application Id.
|
|
|
104
108
|
import { AdMob } from '@capacitor-community/admob';
|
|
105
109
|
|
|
106
110
|
export async function initialize(): Promise<void> {
|
|
111
|
+
const { status } = await AdMob.trackingAuthorizationStatus();
|
|
112
|
+
|
|
113
|
+
if (status === 'notDetermined') {
|
|
114
|
+
/**
|
|
115
|
+
* If you want to explain TrackingAuthorization before showing the iOS dialog,
|
|
116
|
+
* you can show the modal here.
|
|
117
|
+
* ex)
|
|
118
|
+
* const modal = await this.modalCtrl.create({
|
|
119
|
+
* component: RequestTrackingPage,
|
|
120
|
+
* });
|
|
121
|
+
* await modal.present();
|
|
122
|
+
* await modal.onDidDismiss(); // Wait for close modal
|
|
123
|
+
**/
|
|
124
|
+
}
|
|
125
|
+
|
|
107
126
|
AdMob.initialize({
|
|
108
127
|
requestTrackingAuthorization: true,
|
|
109
128
|
testingDevices: ['2077ef9a63d2b398840261c8221a0c9b'],
|
|
@@ -876,29 +895,3 @@ You should run `pod repo update` ;
|
|
|
876
895
|
## License
|
|
877
896
|
|
|
878
897
|
Capacitor AdMob is [MIT licensed](./LICENSE).
|
|
879
|
-
|
|
880
|
-
## Contributors ✨
|
|
881
|
-
|
|
882
|
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
883
|
-
|
|
884
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
885
|
-
<!-- prettier-ignore-start -->
|
|
886
|
-
<!-- markdownlint-disable -->
|
|
887
|
-
<table>
|
|
888
|
-
<tr>
|
|
889
|
-
<td align="center"><a href="https://wako.app"><img src="https://avatars1.githubusercontent.com/u/216573?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jean-Baptiste Malatrasi</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=JumBay" title="Code">💻</a></td>
|
|
890
|
-
<td align="center"><a href="https://github.com/gant02"><img src="https://avatars1.githubusercontent.com/u/6771123?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gant02</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=gant02" title="Code">💻</a></td>
|
|
891
|
-
<td align="center"><a href="https://www.saninnsalas.com"><img src="https://avatars1.githubusercontent.com/u/5490201?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Saninn Salas Diaz</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=distante" title="Code">💻</a></td>
|
|
892
|
-
<td align="center"><a href="https://www.nicolueg.com"><img src="https://avatars.githubusercontent.com/u/48101693?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nico Lueg</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=NLueg" title="Code">💻</a></td>
|
|
893
|
-
<td align="center"><a href="https://www.linkedin.com/in/ghonche-yqr-21774b114/"><img src="https://avatars.githubusercontent.com/u/25591295?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ghonche Yqr</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=ghonche-yqr" title="Documentation">📖</a></td>
|
|
894
|
-
<td align="center"><a href="https://github.com/vanessag"><img src="https://avatars.githubusercontent.com/u/4007550?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vanessag</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=vanessag" title="Code">💻</a></td>
|
|
895
|
-
<td align="center"><a href="https://mattmilan.dev/"><img src="https://avatars.githubusercontent.com/u/49694881?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Milan</b></sub></a><br /><a href="https://github.com/capacitor-community/admob/commits?author=mattmilan-dev" title="Code">💻</a></td>
|
|
896
|
-
</tr>
|
|
897
|
-
</table>
|
|
898
|
-
|
|
899
|
-
<!-- markdownlint-restore -->
|
|
900
|
-
<!-- prettier-ignore-end -->
|
|
901
|
-
|
|
902
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
903
|
-
|
|
904
|
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
package/android/build.gradle
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
ext {
|
|
2
|
-
junitVersion =
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
buildscript {
|
|
8
|
-
ext.kotlin_version = '1.
|
|
9
|
+
ext.kotlin_version = '1.5.21'
|
|
9
10
|
repositories {
|
|
10
11
|
google()
|
|
11
12
|
jcenter()
|
|
@@ -49,7 +50,7 @@ repositories {
|
|
|
49
50
|
mavenCentral()
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
def testRunner = "1.
|
|
53
|
+
def testRunner = "1.4.0"
|
|
53
54
|
|
|
54
55
|
dependencies {
|
|
55
56
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
@@ -70,14 +71,15 @@ dependencies {
|
|
|
70
71
|
// androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
71
72
|
// androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
implementation 'com.android.
|
|
74
|
+
// after 20.5.0, require minCompileSdk (31)
|
|
75
|
+
implementation 'com.google.android.gms:play-services-ads:20.4.0'
|
|
76
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
75
77
|
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
|
|
76
|
-
implementation "androidx.core:core-ktx:1.
|
|
78
|
+
implementation "androidx.core:core-ktx:1.6.0"
|
|
77
79
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
// Allow to run unit test with ./gradlew test
|
|
81
83
|
tasks.withType(Test) {
|
|
82
84
|
useJUnitPlatform()
|
|
83
|
-
}
|
|
85
|
+
}
|
package/dist/plugin.js
CHANGED
|
@@ -136,6 +136,7 @@ class BannerExecutor: NSObject, GADBannerViewDelegate {
|
|
|
136
136
|
private func removeBannerViewToView() {
|
|
137
137
|
if let rootViewController = UIApplication.shared.keyWindow?.rootViewController {
|
|
138
138
|
if let subView = rootViewController.view.viewWithTag(2743243288699) {
|
|
139
|
+
bannerView.delegate = nil
|
|
139
140
|
NSLog("AdMob: find subView")
|
|
140
141
|
subView.removeFromSuperview()
|
|
141
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-community/admob",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-0",
|
|
4
4
|
"description": "A native plugin for AdMob",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"clean": "rimraf ./dist",
|
|
38
38
|
"watch": "tsc --watch",
|
|
39
39
|
"prepublishOnly": "npm run build",
|
|
40
|
-
"release": "np"
|
|
40
|
+
"release": "np --no-tests"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@capacitor/android": "^3.0.0",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
},
|
|
70
70
|
"lint-staged": {
|
|
71
71
|
"*.{ts}": [
|
|
72
|
-
"npm run eslint -- --fix",
|
|
73
72
|
"npm run prettier -- --write",
|
|
74
73
|
"git add"
|
|
75
74
|
],
|
package/ios/Plugin/.DS_Store
DELETED
|
Binary file
|