Interstital ads not showing on iPad mini 2 nor on iPhone 4S

Hi guys,

Can somebody tell me from below console log why interstital ads (vungle/iads/admob) are not showing?

iPhone 4S runs on iOS 9.0

iPad mini2 runs on iOS 9.02.

I have disabled ATS in build.settings:

settings = { orientation = { default = "landscapeRight", }, iphone =    {       plist =       {          NSAppTransportSecurity =          {             NSAllowsArbitraryLoads = true          },       },    },     plugins =     {         ["CoronaProvider.native.popup.activity"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { iphone=true, ["iphone-sim"]=true },         },         ["CoronaProvider.ads.vungle"] =         {             publisherId = "com.vungle",         },                  ["plugin.google.play.services"] =         {             publisherId = "com.coronalabs"         },                  ["CoronaProvider.ads.iads"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { iphone=true, ["iphone-sim"]=true },         },              },            }

xCode 7.1.1 Console log:

Nov 14 22:13:23 IVANs-iPad Moric[373] <Warning>: luaopen_CoronaProvider_ads_admob

Nov 14 22:13:23 IVANs-iPad Moric[373] <Warning>: cache path: /var/mobile/Containers/Data/Application/02FD4A51-625C-49EB-A9BF-0533D8E12A3B/Library/Caches/vungle

Nov 14 22:13:25 IVANs-iPad SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Nov 14 22:13:25 IVANs-iPad SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Nov 14 22:13:25 IVANs-iPad duetexpertd[150] <Warning>: mme: com.andel.dump, 2015-11-14 21:13:25 +0000, 

Nov 14 22:13:25 IVANs-iPad SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Nov 14 22:13:25 IVANs-iPad SpringBoard[53] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.

Ads are working fine on Android, but when I change App IDs for iOS, they do not show  :frowning:

Any ideas?

Should I initialize all three ads networks at the same time via ad.init() ?

Tnx.

Ivan

  1. Are they working on some iOS devices and not others or is this just a case of them not working at all on your iOS devices.

2 . iAds - If I recall correctly, these won’t show if you’re not using the proper credentials for building the app.  i.e. I don’t think a wildcard certificate will work.  (@all - If am am wrong here, please correct me.  My memory is fuzzy on this.)

  1. We need to see the code where you do the following (minus your IDs and posted as well formatted code blocks):
  • Initialization of ads
  • Code used to show ad (including selecting provider, etc.)

Tip: If you’re switching ad providers, you must remember to select the proper provider first.

  1. Initialization - You initialize sequentially, then select the provider you want to show, just before showing or caching (depends on provider).

  2. Finally - Please always tell us the exact version of Corona you’re using.  While I hate to say it, bugs do happen (though not likely in this case) and knowing the version makes it possible for us (community) and the staff to properly reproduce issues.  For example if I posted a question today I’d say “I’m using Corona 2015.2771”

Regarding adMob.  Do the following;

  1. Download my project: http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/06/admob.zip

  2. Insert your iOS ID  in main.lua where it says ADMOBIDGOESHERE (ignore fact name of variable is ‘bannerID’)

  3. Change line 32 from this

    ads.show( “banner”, { x = xPos, y = yPos, appId = bannerID, testMode = isTestMode } )

to this:

ads.show( "interstitial", { appId = bannerID, testMode = isTestMode } )&nbsp;
  1. Build it for iOS and run it.

If your credentials and admob campaign are setup right it will work.

This way, at least you’ll know your admob campaign is working.

IF you still don’t get a ad, check the xCode console for a message about no video getting cached.  That happens on difficult days with adMob.

PS - Just so there is NO confusion here.  YES, my sample is a tester for banner ads, but the changes I gave above force it to show an interstitial test ad.

Hi Roaminggamer,

Your sample adMob code works like a charm (showing interstitials)!  :smiley:

Thanks!

Regarding above questions:

#1 - Ads are not working on ALL of my devices.

#2 - You are right, for iAds you have to use reverse domain name, and build app like that (register it like that on itunnes connect).

#3I’ve been following this guide:

https://coronalabs.com/blog/2013/11/19/tutorial-using-multiple-ad-networks/

So in level.lua my code looks like this:

---- LOCAL FORWARD REFERENCES local function vungleListener( event ) -- Video ad not yet downloaded and available if ( event.type == "adStart" and event.isError ) then ads:setCurrentProvider( "admob" ) ads.show( "interstitial",&nbsp;{&nbsp;testMode = true&nbsp;} ) elseif ( event.type == "adEnd" ) then -- Ad was successfully shown and ended; hide the overlay so the app can resume. composer.hideOverlay() else print( "Received event", event.type ) end return true end local function adMobListener( event ) if ( event.isError ) then ads:setCurrentProvider( "iAds" ) ads.show( "interstitial" ) end return true end local function iAdsListener( event ) if ( event.isError ) then -- all three providers failed to show end return true end -- THEN AT TOP OF "scene:show" I AM CALLING THIS: ads.init( "admob", "my-ad-unit-id-here", adMobListener ) ads.init( "iads", "com.mydomain.myapp", iAdsListener ) ads.init( "vungle", "myappID", vungleListener ) -- THEN AT "gameover" I AM CALLING THIS: ads:setCurrentProvider( "vungle" ) ads.show( "interstitial", { isAnimated = false, isAutoRotation = true, } )

#4 - Obviously I am doing something wrong when calling initialisation of all three providers at the same time ?!

But initialising all at the same time works well on Android?

#5 - I am using Corona build 2015.2768

What do you think, what am I missing here?!  <_<

Many, many thanks!

Ivan

I can’t tell you for sure right now.  

Somebody will have to step in and answer your latest question #4.

My only thought is to give some time between initialization calls, and don’t try to show right after sequentially initializing three networks.  

If you’re trying to show a vungle ad and the first app launch it won’t work anyways.  Vungle needs more time to cache the ad.  You’ll want to buffer all this with a splash screen during init, then try showing the ad when you show your first screen after the splash.

Oh, and if your listeners are changing the current provider you’re going to run into problems too.  

That looks now like you’re saying “Hey Vungle and adMob… whoever gets here first show an ad”.  The problem is they will tromp on each other.  That is not the way to handle fallback ads.  i.e. Show network B if network A fails.

The code will need to be more sophisticated than that.  Sorry!

Sorry,

Ed

Ok Ed :slight_smile:
Fair!
I will play around some time with this…
When you read “Using multiple Ad networks” tutorial, it all looks simple :slight_smile:
I can tell you that above system works good on Android (Vungle and AdMob).
I am using above code (without iAds).

Ivan

  1. Are they working on some iOS devices and not others or is this just a case of them not working at all on your iOS devices.

2 . iAds - If I recall correctly, these won’t show if you’re not using the proper credentials for building the app.  i.e. I don’t think a wildcard certificate will work.  (@all - If am am wrong here, please correct me.  My memory is fuzzy on this.)

  1. We need to see the code where you do the following (minus your IDs and posted as well formatted code blocks):
  • Initialization of ads
  • Code used to show ad (including selecting provider, etc.)

Tip: If you’re switching ad providers, you must remember to select the proper provider first.

  1. Initialization - You initialize sequentially, then select the provider you want to show, just before showing or caching (depends on provider).

  2. Finally - Please always tell us the exact version of Corona you’re using.  While I hate to say it, bugs do happen (though not likely in this case) and knowing the version makes it possible for us (community) and the staff to properly reproduce issues.  For example if I posted a question today I’d say “I’m using Corona 2015.2771”

Regarding adMob.  Do the following;

  1. Download my project: http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/06/admob.zip

  2. Insert your iOS ID  in main.lua where it says ADMOBIDGOESHERE (ignore fact name of variable is ‘bannerID’)

  3. Change line 32 from this

    ads.show( “banner”, { x = xPos, y = yPos, appId = bannerID, testMode = isTestMode } )

to this:

ads.show( "interstitial", { appId = bannerID, testMode = isTestMode } )&nbsp;
  1. Build it for iOS and run it.

If your credentials and admob campaign are setup right it will work.

This way, at least you’ll know your admob campaign is working.

IF you still don’t get a ad, check the xCode console for a message about no video getting cached.  That happens on difficult days with adMob.

PS - Just so there is NO confusion here.  YES, my sample is a tester for banner ads, but the changes I gave above force it to show an interstitial test ad.

Hi Roaminggamer,

Your sample adMob code works like a charm (showing interstitials)!  :smiley:

Thanks!

Regarding above questions:

#1 - Ads are not working on ALL of my devices.

#2 - You are right, for iAds you have to use reverse domain name, and build app like that (register it like that on itunnes connect).

#3I’ve been following this guide:

https://coronalabs.com/blog/2013/11/19/tutorial-using-multiple-ad-networks/

So in level.lua my code looks like this:

---- LOCAL FORWARD REFERENCES local function vungleListener( event ) -- Video ad not yet downloaded and available if ( event.type == "adStart" and event.isError ) then ads:setCurrentProvider( "admob" ) ads.show( "interstitial",&nbsp;{&nbsp;testMode = true&nbsp;} ) elseif ( event.type == "adEnd" ) then -- Ad was successfully shown and ended; hide the overlay so the app can resume. composer.hideOverlay() else print( "Received event", event.type ) end return true end local function adMobListener( event ) if ( event.isError ) then ads:setCurrentProvider( "iAds" ) ads.show( "interstitial" ) end return true end local function iAdsListener( event ) if ( event.isError ) then -- all three providers failed to show end return true end -- THEN AT TOP OF "scene:show" I AM CALLING THIS: ads.init( "admob", "my-ad-unit-id-here", adMobListener ) ads.init( "iads", "com.mydomain.myapp", iAdsListener ) ads.init( "vungle", "myappID", vungleListener ) -- THEN AT "gameover" I AM CALLING THIS: ads:setCurrentProvider( "vungle" ) ads.show( "interstitial", { isAnimated = false, isAutoRotation = true, } )

#4 - Obviously I am doing something wrong when calling initialisation of all three providers at the same time ?!

But initialising all at the same time works well on Android?

#5 - I am using Corona build 2015.2768

What do you think, what am I missing here?!  <_<

Many, many thanks!

Ivan

I can’t tell you for sure right now.  

Somebody will have to step in and answer your latest question #4.

My only thought is to give some time between initialization calls, and don’t try to show right after sequentially initializing three networks.  

If you’re trying to show a vungle ad and the first app launch it won’t work anyways.  Vungle needs more time to cache the ad.  You’ll want to buffer all this with a splash screen during init, then try showing the ad when you show your first screen after the splash.

Oh, and if your listeners are changing the current provider you’re going to run into problems too.  

That looks now like you’re saying “Hey Vungle and adMob… whoever gets here first show an ad”.  The problem is they will tromp on each other.  That is not the way to handle fallback ads.  i.e. Show network B if network A fails.

The code will need to be more sophisticated than that.  Sorry!

Sorry,

Ed

Ok Ed :slight_smile:
Fair!
I will play around some time with this…
When you read “Using multiple Ad networks” tutorial, it all looks simple :slight_smile:
I can tell you that above system works good on Android (Vungle and AdMob).
I am using above code (without iAds).

Ivan