Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting of different app id for ios/android #654

Merged
merged 2 commits into from
Nov 18, 2019

Conversation

jonworek
Copy link
Contributor

Problem

The new setting for ADMOB_APP_ID was taking a single variable that would be applied to both the android app's AndroidManifest.xml and the iOS apps plist config. Google issues different app ids for the android and ios version of an app, so it would seem appropriate to have two different settings.

Solution

I split the variable definition of app id into two: one for android and one for ios. I also updated the readme.

An android and ios app will have a different admob app id. This change
allows them to be specified separately.
@floatinghotpot floatinghotpot merged commit e33c48e into floatinghotpot:master Nov 18, 2019
@floatinghotpot
Copy link
Owner

Yes, that will work. Thanks for the patch!

@ColDrekken
Copy link

hi, many thx for this!

i tried to ad this with

ionic cordova plugin add cordova-plugin-admobpro@latest --save --variable PLAY_SERVICES_VERSION=16.0.0 --variable ADMOB_ANDROID_APP_ID="ca-app-pub-xxxxxx" --variable ADMOB_IOS_APP_ID="ca-app-pub-xxxxxx"

but i fails with:

Error: Variable(s) missing (use: --variable ADMOB_APP_ID=value).

Did i miss something?

kind regards

@xcafebabe
Copy link

Came a cross with same issue, @floatinghotpot i believe you should do a version bump in your package.json

@ColDrekken as a quick fix you should update temporarily your cordova-plugin-admobpro dependency in your package.json with the github repo and reinstall the package

In your package.json

"dependencies": {
"cordova-plugin-admobpro": "git+https://github.com/floatinghotpot/cordova-admob-pro.git",

and then npm install cordova-plugin-admobpro

That worked for me.

@jimmywkp
Copy link

hi, many thx for this!

i tried to ad this with

ionic cordova plugin add cordova-plugin-admobpro@latest --save --variable PLAY_SERVICES_VERSION=16.0.0 --variable ADMOB_ANDROID_APP_ID="ca-app-pub-xxxxxx" --variable ADMOB_IOS_APP_ID="ca-app-pub-xxxxxx"

but i fails with:

Error: Variable(s) missing (use: --variable ADMOB_APP_ID=value).

Did i miss something?

kind regards

I got the same error here. Need help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants