Installation
This package is a wrapper of admob-plus-cordova
, hence the Cordova plugin configuration is used.
First, set your AdMob application information in package.json
.
package.json
{
"cordova": {
"plugins": {
"admob-plus-cordova": {
"APP_ID_ANDROID": "ca-app-pub-xxx~yyy",
"APP_ID_IOS": "ca-app-pub-xxx~yyy"
}
}
}
}
- Cordova
- Capacitor
ionic cordova plugin add admob-plus-cordova
npm install @admob-plus/ionic
tip
Consider using @admob-plus/capacitor
if your project does not require Cordova.
npm install @admob-plus/ionic
npm install admob-plus-cordova
ionic cap sync
note
ionic-angular
user needs to update typescript
to a recent version, or config "skipLibCheck": true
in tsconfig.json
to avoid type errors.