Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor-community/admob

Package Overview
Dependencies
Maintainers
43
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/admob - npm Package Compare versions

Comparing version 5.3.1 to 6.0.0

36

dist/esm/banner/banner-definitions.interface.d.ts

@@ -10,8 +10,8 @@ import type { PluginListenerHandle } from '@capacitor/core';

/**
* Show a banner Ad
*
* @group Banner
* @param options AdOptions
* @since 1.1.2
*/
* Show a banner Ad
*
* @group Banner
* @param options AdOptions
* @since 1.1.2
*/
showBanner(options: BannerAdOptions): Promise<void>;

@@ -40,9 +40,9 @@ /**

/**
*
* @group Banner
* @param eventName bannerAdSizeChanged
* @param listenerFunc
* @since 3.0.0
*/
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void): PluginListenerHandle;
*
* @group Banner
* @param eventName bannerAdSizeChanged
* @param listenerFunc
* @since 3.0.0
*/
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void): Promise<PluginListenerHandle>;
/**

@@ -56,3 +56,3 @@ * Notice: request loaded Banner ad

*/
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void): Promise<PluginListenerHandle>;
/**

@@ -66,3 +66,3 @@ * Notice: request failed Banner ad

*/
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void): Promise<PluginListenerHandle>;
/**

@@ -76,3 +76,3 @@ * Notice: full-screen banner view will be presented in response to the user clicking on an ad.

*/
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void): Promise<PluginListenerHandle>;
/**

@@ -86,3 +86,3 @@ * Notice: The full-screen banner view will been dismissed.

*/
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void): Promise<PluginListenerHandle>;
/**

@@ -96,3 +96,3 @@ * Unimplemented

*/
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void): Promise<PluginListenerHandle>;
}

@@ -22,7 +22,7 @@ import type { PluginListenerHandle } from '@capacitor/core';

showInterstitial(): Promise<void>;
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): PluginListenerHandle;
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): Promise<PluginListenerHandle>;
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void): Promise<PluginListenerHandle>;
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void): Promise<PluginListenerHandle>;
}

@@ -5,3 +5,3 @@ import type { PluginListenerHandle } from '@capacitor/core';

declare type UnionToIntersection<U> = UnwrapContra<U extends any ? Contra<U> : never>;
declare type Overload<T> = (eventName: T, listenerFunc: (...args: any[]) => any) => PluginListenerHandle;
declare type Overload<T> = (eventName: T, listenerFunc: (...args: any[]) => any) => Promise<PluginListenerHandle>;
declare type OverloadUnionForEnum<T> = T extends any ? Overload<T> : never;

@@ -8,0 +8,0 @@ declare type OverloadUnion<T> = OverloadUnionForEnum<T>;

@@ -10,8 +10,8 @@ import type { PluginListenerHandle } from '@capacitor/core';

/**
* Prepare a reward video ad
*
* @group RewardVideo
* @param options RewardAdOptions
* @since 1.1.2
*/
* Prepare a reward video ad
*
* @group RewardVideo
* @param options RewardAdOptions
* @since 1.1.2
*/
prepareRewardVideoAd(options: RewardAdOptions): Promise<AdLoadInfo>;

@@ -25,8 +25,8 @@ /**

showRewardVideoAd(): Promise<AdMobRewardItem>;
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): Promise<PluginListenerHandle>;
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void): Promise<PluginListenerHandle>;
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void): Promise<PluginListenerHandle>;
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void): Promise<PluginListenerHandle>;
}

@@ -7,5 +7,3 @@ import { WebPlugin } from '@capacitor/core';

export declare class AdMobWeb extends WebPlugin implements AdMobPlugin {
constructor();
initialize(): Promise<void>;
targetSettings(): Promise<void>;
requestTrackingAuthorization(): Promise<void>;

@@ -12,0 +10,0 @@ trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface>;

import { WebPlugin } from '@capacitor/core';
import { AdmobConsentStatus } from './consent/consent-status.enum';
export class AdMobWeb extends WebPlugin {
constructor() {
super({
name: 'AdMob',
platforms: ['web'],
});
}
async initialize() {
console.log('initialize');
}
async targetSettings() {
console.log('targetSettings');
}
async requestTrackingAuthorization() {

@@ -17,0 +8,0 @@ console.log('requestTrackingAuthorization');

@@ -221,14 +221,5 @@ 'use strict';

class AdMobWeb extends core.WebPlugin {
constructor() {
super({
name: 'AdMob',
platforms: ['web'],
});
}
async initialize() {
console.log('initialize');
}
async targetSettings() {
console.log('targetSettings');
}
async requestTrackingAuthorization() {

@@ -235,0 +226,0 @@ console.log('requestTrackingAuthorization');

@@ -218,14 +218,5 @@ var AdMobPlugin = (function (exports, core) {

class AdMobWeb extends core.WebPlugin {
constructor() {
super({
name: 'AdMob',
platforms: ['web'],
});
}
async initialize() {
console.log('initialize');
}
async targetSettings() {
console.log('targetSettings');
}
async requestTrackingAuthorization() {

@@ -232,0 +223,0 @@ console.log('requestTrackingAuthorization');

{
"name": "@capacitor-community/admob",
"version": "5.3.1",
"version": "6.0.0",
"description": "A native plugin for AdMob",

@@ -10,3 +10,3 @@ "main": "dist/plugin.cjs.js",

"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},

@@ -47,7 +47,7 @@ "files": [

"devDependencies": {
"@capacitor/android": "5.0.0",
"@capacitor/cli": "5.0.0",
"@capacitor/core": "5.0.0",
"@capacitor/android": "^6.0.0",
"@capacitor/cli": "^6.0.0",
"@capacitor/core": "^6.0.0",
"@capacitor/docgen": "git+https://github.com/rdlabo/capacitor-docgen.git#feat/support_extends_build",
"@capacitor/ios": "next",
"@capacitor/ios": "^6.0.0",
"@ionic/eslint-config": "^0.3.0",

@@ -69,3 +69,3 @@ "@ionic/prettier-config": "^1.0.1",

"dependencies": {
"@capacitor/core": "next"
"@capacitor/core": "^6.0.0"
},

@@ -72,0 +72,0 @@ "husky": {

@@ -121,21 +121,31 @@ <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 [consentInfo, trackingInfo] = await Promise.all([AdMob.requestConsentInfo(), AdMob.trackingAuthorizationStatus()]);
await AdMob.initialize();
const [trackingInfo, consentInfo] = await Promise.all([
AdMob.trackingAuthorizationStatus(),
AdMob.requestConsentInfo(),
]);
if (trackingInfo.status === 'notDetermined') {
/**
* If you want to explain TrackingAuthorization before showing the iOS dialog,
* you can show the modal here.
* ex)
* const modal = await this.modalCtrl.create({
* component: RequestTrackingPage,
* });
* await modal.present();
* await modal.onDidDismiss(); // Wait for close modal
**/
await AdMob.requestTrackingAuthorization();
}
if (consentInfo.status === AdmobConsentStatus.REQUIRED && trackingInfo.status === 'notDetermined') {
/**
* If you want to explain TrackingAuthorization before showing the iOS dialog,
* you can show the modal here.
* ex)
* const modal = await this.modalCtrl.create({
* component: RequestTrackingPage,
* });
* await modal.present();
* await modal.onDidDismiss(); // Wait for close modal
**/
if (consentInfo.isConsentFormAvailable) {
await AdMob.showConsentForm();
} else {
await AdMob.requestTrackingAuthorization();
}
const authorizationStatus = await AdMob.trackingAuthorizationStatus();
if (
authorizationStatus.status === 'authorized' &&
consentInfo.isConsentFormAvailable &&
consentInfo.status === AdmobConsentStatus.REQUIRED
) {
await AdMob.showConsentForm();
}

@@ -463,3 +473,3 @@ }

```typescript
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => Promise<PluginListenerHandle>
```

@@ -472,3 +482,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -481,3 +491,3 @@ --------------------

```typescript
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -492,3 +502,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -501,3 +511,3 @@ --------------------

```typescript
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => Promise<PluginListenerHandle>
```

@@ -512,3 +522,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -521,3 +531,3 @@ --------------------

```typescript
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -532,3 +542,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -541,3 +551,3 @@ --------------------

```typescript
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -552,3 +562,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -561,3 +571,3 @@ --------------------

```typescript
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -572,3 +582,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -650,3 +660,3 @@ --------------------

```typescript
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

@@ -659,3 +669,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -668,3 +678,3 @@ --------------------

```typescript
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
```

@@ -677,3 +687,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -686,3 +696,3 @@ --------------------

```typescript
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -695,3 +705,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -704,3 +714,3 @@ --------------------

```typescript
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

@@ -713,3 +723,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -722,3 +732,3 @@ --------------------

```typescript
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -731,3 +741,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -770,3 +780,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

@@ -779,3 +789,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -788,3 +798,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
```

@@ -797,3 +807,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -806,3 +816,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => Promise<PluginListenerHandle>
```

@@ -815,3 +825,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -824,3 +834,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -833,3 +843,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -842,3 +852,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

@@ -851,3 +861,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -860,3 +870,3 @@ --------------------

```typescript
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

@@ -869,3 +879,3 @@

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

@@ -872,0 +882,0 @@ --------------------

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc