First time setting up ads, AdMob ad not showing up

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",           },       },         },  

Hmm…  So I tried to debug this on my device by putting newText() messages in certain places.

It looks like the app just stalled while calling ads.init(provider, appID, adListener)… Nothing gets called in the lines that follow.

Ouch, nevermind… found the problem.

I simply copied the instructions word-for-word from http://docs.coronalabs.com/guide/monetization/adSupport/index.html without realizing my mistake.     I had to take out the ‘settings =’ portion that surrounded the ‘plugins’ statement.   

I already have 'settings = ’ specified at the start of the build.settings file before the ‘orientation’ and ‘iphone’  blocks…

      plugins =       {           -- key is the name passed to Lua's 'require()'           ["CoronaProvider.ads.admob"] =           {               -- required               publisherId = "com.coronalabs",           },       },         

Hmm…  So I tried to debug this on my device by putting newText() messages in certain places.

It looks like the app just stalled while calling ads.init(provider, appID, adListener)… Nothing gets called in the lines that follow.

Ouch, nevermind… found the problem.

I simply copied the instructions word-for-word from http://docs.coronalabs.com/guide/monetization/adSupport/index.html without realizing my mistake.     I had to take out the ‘settings =’ portion that surrounded the ‘plugins’ statement.   

I already have 'settings = ’ specified at the start of the build.settings file before the ‘orientation’ and ‘iphone’  blocks…

      plugins =       {           -- key is the name passed to Lua's 'require()'           ["CoronaProvider.ads.admob"] =           {               -- required               publisherId = "com.coronalabs",           },       },