I’m trying to set up my first app with ads on AdMob; however, it seems like my device is not even attempting to load the ad.
For example, I have the following code set up, which includes a status text that will clear if the ad is ready to appear:
ad\_status\_text = display.newText( "test", status\_x, status\_y, my\_font, 40 ) group:insert(ad\_status\_text) ads.init( provider, appID, adListener ) showAd( "banner" )
My showAd function is like this:
showAd = function( adType ) ad\_status\_text.text = "" ads.show( adType, { x=myglobals.adX, y=myglobals.adY, testMode=true } ) end
I had earlier declared the following as well:
local ads = require("ads") local provider = "admob" local appID = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx"
On the simulator, obviously it doesn’t support ads, however it does get to the stage in ‘showAd’ where the status text is cleared.
On my iPhone, however, the status text is still there, which means showAd was not even called… How is this possible?
My build.settings has this:
settings = { plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.ads.admob"] = { -- required publisherId = "com.coronalabs", }, }, },