Interstitial ads not showing on iOS? Campaign problem?

Hi, did you have any success in getting the Interstitial ads to show up on your device? I have my campaign set to testmode enabled and when I run the app in the simulator the readout tells me the ads can’t be shown on the device, please build for device. I have revmob banner ads that will show up in this build of my app but theres no indication that the chartboost ads are working. If you set up the app and campaign up on chartboost should it start showing ads immediately or will there be a delay? Also is there a way to hide the ads after calling .show() ?

I found .closeImpression(), so ignore the last part, although .closeImpression() was only available on the github repository examples but not in the coronadocs. Also I didn’t include init() so I’ve added that and will test the app again, so maybe check to see if you included init() in your code too.

@Gordon

The Chartboost SDK will only work on a device (iOS, or Android). It will also work with the Xcode Simulator, but it will not work in the Corona Simulator. The reason why Revmob works in the Corona Simulator is because the Revmob module is developed in Lua. The Chartboost plugin uses the native iOS / Android SDKs and which can’t be run in the Corona Simulator.

Once you set up your campaign, it may take a while (30 minutes to 2 hours) before you will get ads served. If you have your app in Test Mode your app will get test ads with a 100% fill rate.

charboost.closeImpression() will programmatically hide an ad (I’m the developer responsible for this function being added to the official Chartboost SDK). You should normally not have to use this function. The main reason this function was added is because you can run into situations where an ad has become “stuck” on screen. For example you might be trying to show a new ad and you get an “ad is already showing” error. In circumstances like this you could call closeImpression() and retry to show a new ad again. 

The official documentation about the Corona Chartboost plugin can be found here:

https://github.com/swipeware/CoronaChartboostPlugin

(The corona docs are obsolete as of January 2015, and should have already been removed by CoronaLabs. If there are still Chartboost links referring to the Corona docs, please point me to them here so I can tell the Corona team to remove those links)

Please review the Corona Chartboost Sample app to see how to handle the required functions init() and startSession().

https://github.com/swipeware/CoronaChartboostSample

ingemar

I have init() and startSession() set up properly now. In the documentation it says “chartboost.init( options )” which I had but in the example it shows with different brackets like this “chartboost.init { options }”, got me confused. I’ll try the .test mode again, if not then I’ll give it a few hours.

Options is a table, and a table in Lua is declared with { }. In Lua there’s a shorthand notation where you don’t need to include the () when the only argument to a function is a table.

Ex. instead of:

chartboost.init ({ appID=“xxx”, appSignature = “yyy”})

you can skip the ( ) and only need to write: 

chartboost.init { appID=“xxx”, appSignature = “yyy”}

@gordon.j.hunter 

We did end up successfully receiving chartboost ads we wanted, but it took much longer to go from changes on the dashboard to changes on the device (a few hours!) than we expected. We also got some feedback on the same questions we posted here, from chartboost support. Take a look:

Hello!

Thank you for emailing in!

Any changes made to your app settings or campaign settings can take up to 30 minutes for those changes to take effect in your live app. We are in the process of making sure this information is visible after making said changes on the dashboard.

I took a look at your account and I noticed your app you are testing is currently opted out of behavioural targeting. What this means is your app will only be able to cross promote (or promote in general) other apps that are opted out of behavioural targeting.

Archived campaigns becoming active again should not happen (obviously, haha) do you have specific campaign ID’s where this has happened? I can take a deeper look on my end to make sure nothing is going wrong on the server side.

Looking forward to your response!

Jason Battle

Technical Support Specialist

 

Nick Sherwood  (Chartboost Support)

May 12, 1:53 PM

Hi Simon,

Thanks for the reply! You’re definitely not crazy! The SDK light is lit up for ABC Galaxy, however that is the only app that seems to be integrated with the SDK. In FEStories_4_11_Test (5550b06404b01648acf4b157) “ABC Galaxy” is one of several apps that are attempting to promote “Fun English Stories”. An app cannot promote another app if the SDK is not integrated into the code. While “ABC Galaxy” may be able to serve a cross promotion interstitial, this is the only app that will be able to do so.

Any app that you want to publish in will need to have the Chartboost SDK integrated. With that said, currently the only app you could publish in would be “ABC Galaxy”.

On a separate note, I noticed you’ve archived the FEStories_4_11_Test Campaign - not sure if this was intentional. Do you have plans to integrate the SDK into any of the other games in your account?

As for seeing test ads in ABC Galaxy, I ran the App ID and Signature in our sample project and called for an interstitial. I was successfully able to see the ad, which tells me the dashboard has been set up correctly. Have you tried testing on multiple devices, or resetting the IFA on the device you’re using? Chartboost will try to never deliver an ad to a game that you already have installed on your device, thus the reason behind testing on a new device. There is also a possibility of fill rate being a factor as to why you might not be seeing ads (just after you’ve seen a test interstitial).

In general, what you’re describing happens when no more of the interstitials available at the time you’re testing in the network satisfy the conditions you and the advertisers set in your campaigns. Advertisers choose conditions/parameters they would like to target so that they can acquire specific users. These conditions include filtered apps/publishers/age ratings/genres, country/device/OS targeting and more.

Please let me know if I can clarify anything else, and as always, feel free to respond with any other questions or problems you may have. Thanks again for the reply, and enjoy the rest of your day!

@ingemar @sgbraunstein

I’ve tried everything except starting a new campaign and trying again. What I have in my “main.lua” is:

  local chartboost = require( “plugin.chartboost” )

  local yourAppID        = “xxxx”

  local yourAppSignature = “xxxx”

  chartboost.startSession( yourAppID, yourAppSignature )

  local function chartBoostListener( event )

    for k, v in pairs( event ) do

        print( tostring(k)… “=”… tostring(v) )

    end

  end

  

  chartboost.init{ yourAppID, yourAppSignature, chartBoostListener }

and in the page I want to show the ads called “reloader.lua” I have:

local chartboost = require( “plugin.chartboost” )

local yourAppID        = “xxxx”

local yourAppSignature = “xxxx”

chartboost.startSession( yourAppID, yourAppSignature )

chartboost.init{ yourAppID, yourAppSignature }

and later down the page I call:

chartboost.show( “interstitial” )

chartboost.autoCacheAds( true )

then before the page exits:

chartboost.closeImpression()

I thought this would be simple and properly cover everything, is there anything I should take out or rearrange?

@Gordon

I’d advise you to carefully examine the Chartboost Sample app to see how things work.

Here are the issues I see with your code:

  1. You should only call chartboost.init() once. You can keep it in your main.lua if you wish, but you need to remove it elsewhere.

  2. chartboost.startSession() should only be called in an applicationResume event (see the sample app).

  3. Although not a severe issue, it makes more sense to put chartboost.autoCacheAds() in main.lua after init().

  4. You should not make a habit to call chartboost.closeImpression() unless absolutely necessary as I described in a previous post above (it’s my first reply right after your first two posts about your issues). I advise you to remove this statement from your code.

  5. In your main.lua after chartboost.init(), I’d recommend to call chartboost.cache(“interstitial”) to get the first ad ready for display. Otherwise your app may take several seconds to cache the first ad before display.

  6. Before calling chartboost.show(“interstitial”) I’d recommend testing if an ad is available by calling chartboost.hasCachedInterstitial() which returns true/false. There’s no guarantee that an ad will be available and you should handle the situation if there is no ad to be displayed.

@ingemar Thanks for the info!

I’ll try implementing what you suggested and have a better look at the sample app and documentation.

@ingemar 

Hey, just a quick question – if my event listener receives the “cached” event, that means that there’s definitely an ad available? And then if I call showAd, it should just show an ad (we’re talking about interstitial ads, right?)

I receive debug output as such:

May 18 16:18:34 Lapdog FE110-apple[655] \<Warning\>: CHARTBOOST EVENT type : interstitial May 18 16:18:34 Lapdog FE110-apple[655] \<Warning\>: CHARTBOOST EVENT name : chartboost May 18 16:18:34 Lapdog FE110-apple[655] \<Warning\>: CHARTBOOST EVENT phase : cached May 18 16:18:34 Lapdog FE110-apple[655] \<Warning\>: CHARTBOOST EVENT location : main\_menu May 18 16:18:34 Lapdog FE110-apple[655] \<Warning\>: CHARTBOOST EVENT response : cached May 18 16:18:35 Lapdog FE110-apple[655] \<Warning\>: IS AD CACHED? false

The last one, “Is Ad Cached?” is showing the return for the following line:

return chartboost.hasCachedInterstitial()

Is it possible for the chartboost “cached” event to fire, but then not to have any ad to show? Am I misunderstanding this information?

Thanks a bunch,

Simon

@Simon

The reason for this is that in your last example, the statement return chartboost.hasCachedInterstitial() checks if an ad is cached for the default location. In the log I can see that you have cached an ad for the location “main_menu”.

If you want to check the caching for that location you’d need to use return chartboost.hasCachedInterstitial(“main_menu”). 

You can cache ads for multiple locations, but it’s recommended not to go crazy with it and only cache as few as possible to preserve memory.