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

[WARN] Capacitor WebPlugin "AdMob" config object was deprecated in v3 and will be removed in v4. #303

Open
KiddoV opened this issue Dec 8, 2023 · 8 comments

Comments

@KiddoV
Copy link

KiddoV commented Dec 8, 2023

Describe the bug
I encountered a warning when first initialize the plug in.

Capacitor WebPlugin "AdMob" config object was deprecated in v3 and will be removed in v4.

Screenshots
warn

What does this mean and how do I get rid of it?

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: MS Edge
  • Version: 119.0.2151.93 (Official build) (64-bit)

Smartphone (please complete the following information):

  • Device: Android Emulator
  • OS: Android
  • Browser stock browser
  • Version N/A
@distante
Copy link
Contributor

This is just a warning. Should be easily fixed though.

@KiddoV
Copy link
Author

KiddoV commented Jan 10, 2024

How do you fix it? I would like my console to be cleaner.
Thanks,

@distante
Copy link
Contributor

You will need to update the web version of the plugin.

@KiddoV
Copy link
Author

KiddoV commented Jan 10, 2024

I ran npm install @capacitor-community/admob@latest
It still have the warning.

@distante
Copy link
Contributor

I ran npm install @capacitor-community/admob@latest
It still have the warning.

I mean in the source code of the plugin.

@KiddoV
Copy link
Author

KiddoV commented Jan 10, 2024

I see, but it is not a good practice to change the source code.

I think I will just do it like this:

if (Capacitor.isNativePlatform()) {
    admobInitialize();
}

Since my app is only on mobile platform.

@folsze
Copy link

folsze commented Feb 15, 2024

Is it possible that this still shows up for you, even after adding the if-statement? I am not entirely sure but I think for me it does

@KiddoV
Copy link
Author

KiddoV commented Feb 15, 2024

After adding the if statement, it will ensure AdMob only run on mobile platform, so I am certain this warning will no longer display on the web platform when you open it in a browser. You can try for yourself and see.

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

No branches or pull requests

3 participants