Ad Mob integration build error

Ok, I may missunderstand something, and please correct me, but you are not supposed to replace the “com.coronalabs” with your own admob publisher Id. 

The publisherId in the build settings refers to the publisher of the plugin, not to your own ad publisher Id. 

Does this solve your problem?

That said, I have the following problem with the admob:

I add the plugin declaration to the build.settings just fine, and all appears fine without any errors in the corona simulator, and the app works fine, but when I try to build it for ios, in order to test it on the xcode ios simulator, the app crashes, just right after the initial loading screen. 

The console records the crash, but I cannot understand what is going on.

https://docs.google.com/document/d/1XRqyvcPcd1N3TfV-Vt43k_SQJSzZU6Fsa0h33R3Y9rA/edit?usp=sharing )

I tried running the sample code ( https://github.com/coronalabs/plugins-sample-ads-admob ) but I got exactly the same crash, at the same moment (when it tries to open the app in the xcode). 

Anyone has any idea what I am doing wrong and I cannot run the sample (or my own) code? 

I am getting the same problem like in koyandianthos post.

and where should i give AdMob publisher id?

Honestly, the crash dump isn’t nearly as useful as a capture of the console log.  Tether your device to your computer via the USB sync cable, run Xcode, open it’s Organizer.  Find your device on the left hand side bar.  You may have to wait a minute for it to show up and if you’ve never done this before, click on the device and click the “Use for development” button.  If you have to do that it may take a few minutes for Xcode to gather all the info it needs.

Once you’re setup, click on the “Console” entry below your device name in the side bar, run your app and look for errors to show up.  Those are going to be infinitely more helpful.   For the Xcode simulator, you need to run the “Console” app … either from /Applications or using Spotlight (the search magnifying glass at the top right of your Mac) and typing in Console to find it.   Any errors that your app is putting out will be there.

Ah, I see. 

Unfortunatelly this is the first days I have an mac computer, so I am still finding my way around it. All the previous development and the app currently live in google play were done in a windows pc.

  1. I do not have a real device to test it right now. The only way I can test it is by running the xcode simulator. I have not even managed to run my app in the simulator without having to do “build for ios” every time.

  2. I opened the mac console , and that is where I got the crash dump. Is there a way to see the xcode console without having an actual device?

  3. Also, just to ensure if this is the issue: I downloaded and installed the corona that is in your website a couple of days ago. It says that I am running Version 2013.1076 (2013.4.3) . 

I have not downloaded any nightly builds or any additional plugins. Since the admob plugin is new, should I download something else and install it before I try to build using this code ?

Thank you

Konstantinos

Ok, my mistake was that I had  not downloaded a daily build that included the admob plugin. 

Also, I found out that (unlike the windows version that I was using until now), in a Mac, the console does not automatically open when you run the corona simulator, but the outcome goes to the mac console (the existence of I didnt know until now).

It all works ok now (I think. The app does not crashes, but I havent seen an ad being displayed either).

thanks

K.

only in the ad init function

ads.init( provider, appID, adListener )

As provider you give “admob” and as appID, your publisher ID for that specific app in your adMob account (please note: every app you add to admob has a different ID).

Hi,

I experienced same problem as described in this post. I also have a Pro license.

I also tested the example on github and the app crashed just after launched it.

What’s wrong with admob? Do you have any suggestions to fix this issue?

Thanks!

Hi g.attanasio

Did you download a daily build from the coronalabs website?

If you did not, then go to http://www.coronalabs.com/ log in, and at the top bar, you will see as first link the “daily builds”

Download and install the latest one, and then build your app again.

Did that solve the issue for you?

Hi Koyandianthos,

Just downloaded the 2013.1134, compiled for the Xcode simulator and a black screen is displayed. I can only switch the app off and nothing else.

Thanks

Does the console give you any error when you try to run the app?

I receive this error from Console log:

03/06/13 11:46:12,579 Ads[1126]: Runtime error

ERROR: Could not load provider (admob) due to the following reason: module ‘CoronaProvider.ads.admob’ not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive

    no field package.preload[‘CoronaProvider.ads.admob’]

    no file ‘/Users/ABC/Library/Application Support/iPhone Simulator/6.0/Applications/EC48D723-7CEA-4DE4-9E80-2E6FACC94986/Ads.app/CoronaProvider.ads.admob.lua’

    no file ‘/Users/ABC/Library/Application Support/iPhone Simulator/6.0/Applications/EC48D723-7CEA-4DE4-9E80-2E6FACC94986/Ads.app/CoronaProvider.ads.admob.lua’

    no file ‘./CoronaProvider.ads.admob.so’

    no file ‘/Users/ABC/Library/Application Support/iPhone Simulator/6.0/Applications/EC48D723-7CEA-4DE4-9E80-2E6FACC94986/Ads.app/CoronaProvider.ads.admob.so’

    no file ‘./CoronaProvider.so’

    no file '/Users/ABC/Library/Application Support/iPhone Simulator/6.0/Applications/EC48D723-7CEA-4DE4-9E80-2E6FACC94986/Ads.app/CoronaProvider.so’CoronaProvider.ads.admob.

stack traceback:

    [C]: ?

    [C]: in function ‘assert’

    ?: in function ‘requireProvider’

    ?: in function ‘setCurrentProvider’

    ?: in function ‘init’

    ?: in main chunk

Thanks!

Ok, when  I downloaded the daily build and reinstalled corona simulator, I restarted the corona simulator. When I did that, the first time I tried to run my app, when corona simulator read the settings file, it returned a message saying something like “corona detected that you want to use a plugin with the name ads.adsmob. Do you want corona to download it”? I answered yes, it run smoothly, and then I recompiled.

Bottomline: shut down the corona simulator, reinstall the corona simulator from the daily build, overwriting everything preexisting, and then run the corona simulator again. 

Further than that I am affraid I cannot really help, as I am novice myself :-), and you will have to wait for some coronalabs staff

Thank you for your precious suggestions - In order to receive the alert for the plugin downloading, I needed to completely delete Corona from the computer. After that and after installed the plugins I had been able to see ads on the Xcode Simulator!

Thaaaanks!

Is the another way of installing the admob plugin? When run the sample project from corona, change the appid to my publisher id, it attempts to download plugin but hangs at about 50%. I am using starter version. I just download corona today so I have latest starter version.

Please try again. We had an issue with ad provider plugins that we just fixed late this afternoon.

Is the another way of installing the admob plugin? When run the sample project from corona, change the appid to my publisher id, it attempts to download plugin but hangs at about 50%. I am using starter version. I just download corona today so I have latest starter version.

Please try again. We had an issue with ad provider plugins that we just fixed late this afternoon.