Get Error with ads admob

Hey guys,

I have an issue here that starts appear.
In the past it works but now I get this error, when I try my app on my iPhone.
 

ERROR: Could not load provider (admob) due to the following reason: module ‘CoronaProvider.ads.admob’ not found:resouce… and so on.

So my code looks like this:
 

local ads = require "ads"  local provider = "admob" local appID = "xxxxxxxxxxxxxxxxxxxxx" ads.init( provider, appID )

later in some moments I call

ads.show( "xxxxxxx" )

So where is the problem ?

Hope someone of you can help me :slight_smile:

Thanks in advance & best regards

Dimitri

Hi @Dimitri,

Did you include the AdMob plugin in your project? If so, can you show your code for doing so?

https://docs.coronalabs.com/plugin/ads-admob-v2/index.html

Thanks,

Brent

Hi Brent
with “include the admob plugin in my project” you mean the plugin entry in the build settings file ?
That looks like this:

plugins =    {         ["plugin.google.play.services"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { android=true }         },     },   

Thank you
Dimitri

Hi Dimitri,

You’ve restricted the plugin to Android only because of your “supportedPlatforms” table keys, and now you’re trying it on iOS, so naturally it can’t find it.

https://docs.coronalabs.com/plugin/ads-admob-v2/index.html

Best regards,

Brent

Aaah I added this supportedPlatforms entry shortly, because I build in IAP and the documentation says I have to add it.
Thats why it stopped working.

Thanks for your help and best regards,

Dimitri

Hi @Dimitri,

Did you include the AdMob plugin in your project? If so, can you show your code for doing so?

https://docs.coronalabs.com/plugin/ads-admob-v2/index.html

Thanks,

Brent

Hi Brent
with “include the admob plugin in my project” you mean the plugin entry in the build settings file ?
That looks like this:

plugins =    {         ["plugin.google.play.services"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { android=true }         },     },   

Thank you
Dimitri

Hi Dimitri,

You’ve restricted the plugin to Android only because of your “supportedPlatforms” table keys, and now you’re trying it on iOS, so naturally it can’t find it.

https://docs.coronalabs.com/plugin/ads-admob-v2/index.html

Best regards,

Brent

Aaah I added this supportedPlatforms entry shortly, because I build in IAP and the documentation says I have to add it.
Thats why it stopped working.

Thanks for your help and best regards,

Dimitri