@capacitor-community/admob
Advanced tools
Comparing version 5.3.0 to 5.3.1
@@ -15,3 +15,3 @@ import type { BannerDefinitions } from './banner'; | ||
*/ | ||
initialize(options: AdMobInitializationOptions): Promise<void>; | ||
initialize(options?: AdMobInitializationOptions): Promise<void>; | ||
/** | ||
@@ -18,0 +18,0 @@ * Confirm requestTrackingAuthorization status (iOS >14) |
{ | ||
"name": "@capacitor-community/admob", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"description": "A native plugin for AdMob", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
@@ -121,5 +121,5 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
export async function initialize(): Promise<void> { | ||
const { status } = await AdMob.trackingAuthorizationStatus(); | ||
const [consentInfo, trackingInfo] = await Promise.all([AdMob.requestConsentInfo(), AdMob.trackingAuthorizationStatus()]); | ||
if (status === 'notDetermined') { | ||
if (consentInfo.status === AdmobConsentStatus.REQUIRED && trackingInfo.status === 'notDetermined') { | ||
/** | ||
@@ -135,8 +135,9 @@ * If you want to explain TrackingAuthorization before showing the iOS dialog, | ||
**/ | ||
if (consentInfo.isConsentFormAvailable) { | ||
await AdMob.showConsentForm(); | ||
} else { | ||
await AdMob.requestTrackingAuthorization(); | ||
} | ||
} | ||
AdMob.initialize({ | ||
testingDevices: ['2077ef9a63d2b398840261c8221a0c9b'], | ||
initializeForTesting: true, | ||
}); | ||
} | ||
@@ -345,3 +346,3 @@ ``` | ||
```typescript | ||
initialize(options: AdMobInitializationOptions) => Promise<void> | ||
initialize(options?: AdMobInitializationOptions) => Promise<void> | ||
``` | ||
@@ -348,0 +349,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
317893
1082