admob-v2 plugin - test results

v1 is not working this way & no document has explained this for v2.

and admob listener is not called even if it fails (or succeeds), why? 

everything has changed without formal documentation.

I never used “V1”, so I have no experience with it.

I’d say that the combination of ads.load() and ads.isLoaded() replaces any need for callbacks.

ads.load() means “preload” according to the current doc. As I have said many times, no documentation has mentioned these steps & why it should work in the way you described.

Shouldn’t Corona take these issues formally?

ads.load is not working on ios devices.

xcode console output:

Runtime error: ?:0: attempt to call field ‘load’ (a nil value)

I don’t understand.  When I call ads.load() I get a runtime error on simulator and device:

Attempt to call field ‘load’ (a nil value)

Here is the code that throws the error:

ads.load("interstitial", { appId = adUnitID, testMode = false })

I made sure to do a 

ads:setCurrentProvider( "admob" )

right before calling ads.load(), but that didn’t help.  I’m using the current daily build 2014.2347

Is there any sample code available showing how this is supposed to work?

Did you call http://docs.coronalabs.com/daily/plugin/ads-admob-v2/init.html?

Yes, i called ads.init(…)

Did you test this functionality on an ios device before releasing it?

I, too, call ads.init() first.

It works fine for me on Android devices.  But it crashes with the same error on both iOS devices and the Mac simulator.

Strange.

It works fine for me on iOS devices. iPad mini (iOS7) and iPod Touch 5th gen (iOS8 beta)

@deniz, Stephen

Are you guys sure you’re using this?

settings = { plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, }, }

@ingemar

Yes, I’m sure i’m using the right plugin settings, especially since my code works fine on android devices.  I do a platform check to work around the simulator crash so I can build at all, and then it is still crashing on iOS devices ( tested on iPad2 and iPhone 5).  

It’s very strange that it works for you.  I am also init-ing other ad networks, such as vungle and iads. I wonder if there is some combination of other plugins deniz and I are using that is breaking the admob plugin?

It is strange. One other difference is that I’m using Enterprise, so I’m building locally with my own Xcode project.

I’m using Vungle also (which uses the ads API), but I always make sure I call ads:setCurrentProvider(“admob”) before testing for and showing Admob ads, but I see you’re doing that as well.

I’m stumped  :(. 

(1) ads.load() crashes in Simulator, that’s for sure (Corona didn’t test this?)

(2) ads.load() didn’t crash in my iOS devices, which is inconsistent with Stephen’s case. 

(3) I have mentioned several times, Corona should provide formal documentation for V2 usage. Why ads.load() is required and why there is no more callback in listeners.

(4) Corona should do more proactive testing on V2. V2 seems very unreliable. The deadline is coming and I don’t know what else is more important to maintain this income stream for us developers.

I never use the Simulator to test advertising. Also my proprietary ad module disables all ad-networks when run in the Simulator, which explains why I’ve never seen a crash.

I can’t speak for Admob V2 banners as I rarely use banners nowadays, but V2 interstitials have been reliable, at least for me.

Simulator cannot test advertising. But it’s not required or documented that we have to put some conditional check to see if Simulator is running, if so, don’t call ads related function because it will crash. 

Corona should come up and say something about its plan about V2 bugs & documentation.

I agree that it should fail gracefully. It shouldn’t crash…

I haven’t had any other ad or other plugin crash the simulator.  I use a bunch of plugins, many of which don’t have any effect on the simulator, but none of them crash it.  That fact alone leaves me wondering if the admob V2 plugin wasn’t given the normal test treatment at CL before being released.  I don’t really understand the difference in the way plugins are implemented re: Pro vs Enterprise, but it does seem like us Pro users are the ones with the problems with this particular plugin.

As far as I know there shouldn’t be any differences between Enterprise and Pro. We both use the same plugin binaries.

The only difference is that Enterprise projects are built locally whereas Pro projects get built on CL’s servers.

I am having similiar results (on Android simulator crashes as on iOS).

Also, when switched to Admob v2 (even without using ads.load/isLoaded), my app crashes (tested on Android device), when I try to post to Facebook - app becomes unresponsible, after change to Admob v1, I can post to Facebook without problems. 

iOS: ads.load() does not crash in Simulator or on my device, i just can’t seem to display any Admob interstitials with the V2 plugin (no problem with banners). Using similar codes, Admob V1 no problems with banners or interstitials. 

I do get this in the xcode console: <Warning>: <Google:HTML> Google Mobile Ads SDK: You are currently using 6.8.0 of the SDK. A new version, 6.9.2, is available