This is a version of AdMob Plus, a native Cordova plugin, used in GDevelop game engine for displaying ads with Google AdMob. It features a clean API built with modern tools.
If you want to use AdMob plus, it's recommended to first check the original version and consider funding it.
Most changes or fixes done in this version should be contributed back to the original project.
If you want to integrate ads in your GDevelop game, check GDevelop documentation about AdMob.
If you want to use this plugin in your Cordova app:
cordova plugin add gdevelop-cordova-admob-plus --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx
Then follow the original plugin documentation.
Be sure to yarn installed and install the dependencies:
yarn
On macOS, install additional tools with Homebrew:
brew install swiftlint
brew install ios-deploy
Prepare the Cordova plugin:
cd packages/cordova
yarn prepare
In a Cordova project, after cordova platform add [ios|android]
you can add the local plugin:
cordova plugin add --link path/to/admob-plus/packages/cordova/ --variable APP_ID_IOS=ca-app-pub-3940256099942544~3347511713 --variable APP_ID_ANDROID=ca-app-pub-3940256099942544~3347511713
Run cordova plugin rm cordova-admob-plus
beforehand in case of problem.
Run linting and tests:
yarn test-ios:lint
yarn lint
yarn test
You can run the test app:
cd examples/basic
cordova platform add android && cordova run android
cordova platform add ios && cordova run ios
Commit as usual with git. Hooks will run linting and commitlint (so you must have run yarn
before).
Ensure you are logged in npm (npm login
) and have the rights to publish the npm package.
cd packages/cordova
npm publish
This project is not officially affiliated with Google.
This project is MIT licensed.