iAds

Ok, so here’s another bug.

Steps to reproduce:

iPad portrait:

  1. Tap iAd banner to bring up the expanded ad
  2. Turn iPad upside down
  3. Close the expanded ad

Now the banner has rotated, but not the app.

[import]uid: 21746 topic_id: 34226 reply_id: 141966[/import]

Hmm, this is why I’m going nowhere near iAds until all the glitches have been ironed out. Given that AFAIK the inneractive first-run crash bug is still there, I’m not holding out much hope!

http://developer.coronalabs.com/forum/2012/08/02/inneractive-crash

Maybe haakon should be employed as a QA tester! :wink: [import]uid: 93133 topic_id: 34226 reply_id: 141969[/import]

Daily 1024 was supposed to fix the rotation bugs, but introduced a new one. Really poor testing on the Corona side.

About the white rect, I get it about 30 % of the times I start the app. It’s almost like iAd contructs a white rect for showing the ad, puts it on the screen, but eventually fails to load an ad. If the framework uses a long time before it decides it could not load an ad, the white frame is stuck on the screen all that time - until the listener fires.

There must be other delegates you havent subscribed to yet, like one didFinishLoadingAd? You seriously need to dispatch more events to the listener.

Also, using the isError param is breaking with every Corona convention I’ve seen so far as an Enterprise user. You should instead dispatch an event like “didFailToLoadAd” or similar, not use the isError property.

Would you like some help writing this plugin maybe? We can do it - and make it perfect, but not for free, of course. [import]uid: 21746 topic_id: 34226 reply_id: 141971[/import]

Looking at the docs there are several delegates that should be implemented. When we develop plugins, we always implement all the delegates. By doing that, we can take full control over the plugin in all our apps. The way you have implemented the iAds plugin is not leaving us (the corona users) much control.

http://developer.apple.com/library/ios/#documentation/userexperience/Reference/ADBannerViewDelegate_Ref/Reference/Reference.html#//apple_ref/occ/intfm/ADBannerViewDelegate/bannerView:didFailToReceiveAdWithError:

We need all those delegates, and since you have already implemented one of them, getting the rest up & running is like 3 minutes of work. All you need to do with the delegates is to dispatch an event back to Corona (to the adListener) with the same name as the delegate (ie “bannerViewWillLoadAd” etc).

Detecting When Advertisements Are Loaded
– bannerViewWillLoadAd:
– bannerViewDidLoadAd:

Detecting When a User Interacts With an Advertisement
– bannerViewActionShouldBegin:willLeaveApplication:
– bannerViewActionDidFinish:

Detecting Errors
– bannerView:didFailToReceiveAdWithError: [import]uid: 21746 topic_id: 34226 reply_id: 141972[/import]

@haakon:

Please read the first entry of the forum. The iAds support is preliminary.

Each plugin has a evolution cycle and be sure this will evolve really soon to better be controlled from within Corona. We just needed to fix the other bugs this plugin exposed.

As for the number of delegates and the implementation schema, you’re wrong when saying we implemented just one of them, but i won’t go deeper into this, since this is a bug-related thread, not a technical implementation one, and it would be nice to keep it that way.

About the bug you mentioned earlier: “Daily 1024 was supposed to fix the rotation bugs, but introduced a new one”. Which one are we talking about? The one in your post from 14:20?

Alex.

[import]uid: 196533 topic_id: 34226 reply_id: 141976[/import]

alexf, thanks for keeping us updated on this.

There’s a minor outstanding issue with multitouch in 1024. Once ad.show has been called with iAds, neither system.activate(“multitouch”) nor system.deactivate(“multitouch”) appear to function. [import]uid: 87138 topic_id: 34226 reply_id: 142034[/import]

Hey !! Thank for sharing information, Good work guys !! [import]uid: 223481 topic_id: 34226 reply_id: 142064[/import]

I intend to use iAds in my game as well and plan to upload my binary to the AppStore this weekend. I have also noticed that a white rectangle is shown should the ad fail to load. The rectangle remains in place for up to 6 seconds before it disappears. My code then switches to another ad network.

Do I understand correctly that Apple will reject my app due to this white rectangle showing up (even if it is only for a few seconds)? Is there any work-around?

Jens [import]uid: 101883 topic_id: 34226 reply_id: 142081[/import]

@alexf or someone else over at Coronium, what is the status here? Why do we need to wait so long for the rotation fix? [import]uid: 21746 topic_id: 34226 reply_id: 143044[/import]

What is the referencePoint for iAds? it seems like CenterLeftReferencePoint… [import]uid: 13560 topic_id: 34226 reply_id: 142364[/import]

Hi,
I found another problem. When I try to display an a banner ad on the very bottom of the screen, for some reason it shows up a couple of pixels higher than it should.

Here is the code I am using:

[lua]
function _G.showAd(pos)
if pos == “bottom” then
local adY = display.contentHeight - display.screenOriginY - 66
if system.getInfo(“model”) ~= “iPad” then
adY = display.contentHeight - display.screenOriginY - 50
end
ads.show( “banner”, { x=originx, y=adY } )
end
end

showAd(“bottom”)
[/lua]

Does anyone know why this happens?
UPDATE: I changed the adY to display.contentHeight - display.screenOriginY and now Its showing up at the very bottom. Can someone explain why this happens? [import]uid: 130035 topic_id: 34226 reply_id: 143246[/import]

@haakon, i’ll have a solution very soon for both the rotation bugs and the whitespace one you reported.

@Kyle Coburn: thanks for reporting, i’ll have an update on that very soon as well.

@deleurapps: is the code in the post the updated version? Because i see nothing wrong in it…

Alex. [import]uid: 196533 topic_id: 34226 reply_id: 143341[/import]

@alex, thats great! But…

what exactly does “very soon” mean? I’m asking because we have just submitted the new version to Apple, and I’m concidering re-submitting with iAds working properly. We have a deadline with the publisher and a huge campaign starting March 3, so we can only wait one, max two days for the fix to find it’s way into a daily. Is that going to happen? [import]uid: 21746 topic_id: 34226 reply_id: 143351[/import]

@alex, that is the old code.

the updated version would look something like this:

[lua]
function _G.showAd(pos)
if pos == “bottom” then
local adY = display.contentHeight - display.screenOriginY
ads.show( “banner”, { x=originx, y=adY } )
end
end

showAd(“bottom”)
[/lua]

So the y coordinate is the very bottom of the screen.

I have no idea why that works, but it shows correctly on both the xcode simulator, and any device. [import]uid: 130035 topic_id: 34226 reply_id: 143416[/import]

@alexf or someone else over at Coronium, what is the status here? Why do we need to wait so long for the rotation fix? [import]uid: 21746 topic_id: 34226 reply_id: 143044[/import]

Hi,
I found another problem. When I try to display an a banner ad on the very bottom of the screen, for some reason it shows up a couple of pixels higher than it should.

Here is the code I am using:

[lua]
function _G.showAd(pos)
if pos == “bottom” then
local adY = display.contentHeight - display.screenOriginY - 66
if system.getInfo(“model”) ~= “iPad” then
adY = display.contentHeight - display.screenOriginY - 50
end
ads.show( “banner”, { x=originx, y=adY } )
end
end

showAd(“bottom”)
[/lua]

Does anyone know why this happens?
UPDATE: I changed the adY to display.contentHeight - display.screenOriginY and now Its showing up at the very bottom. Can someone explain why this happens? [import]uid: 130035 topic_id: 34226 reply_id: 143246[/import]

@haakon, i’ll have a solution very soon for both the rotation bugs and the whitespace one you reported.

@Kyle Coburn: thanks for reporting, i’ll have an update on that very soon as well.

@deleurapps: is the code in the post the updated version? Because i see nothing wrong in it…

Alex. [import]uid: 196533 topic_id: 34226 reply_id: 143341[/import]

@alex, thats great! But…

what exactly does “very soon” mean? I’m asking because we have just submitted the new version to Apple, and I’m concidering re-submitting with iAds working properly. We have a deadline with the publisher and a huge campaign starting March 3, so we can only wait one, max two days for the fix to find it’s way into a daily. Is that going to happen? [import]uid: 21746 topic_id: 34226 reply_id: 143351[/import]

@alex, that is the old code.

the updated version would look something like this:

[lua]
function _G.showAd(pos)
if pos == “bottom” then
local adY = display.contentHeight - display.screenOriginY
ads.show( “banner”, { x=originx, y=adY } )
end
end

showAd(“bottom”)
[/lua]

So the y coordinate is the very bottom of the screen.

I have no idea why that works, but it shows correctly on both the xcode simulator, and any device. [import]uid: 130035 topic_id: 34226 reply_id: 143416[/import]

I’m wondering what the status might be with “multiple init and switch between ad.” It’s mentioned in the post #20 of this thread. If it’s not available, and if we want to switch between ad providers, do we call ads.init locally in a module every time we call ads.show? When we call ads.init with different ad providers, are we basically re-initializing the ads? I’m thinking of toggling between iAds, InMobi and inneractive. Has anyone tried this? Is it effective? Any oddity switching ad providers?

Also, I checked the daily build notes, but I haven’t located a mention of orientation bug fix. Is it yet to be fixed? (I’m using daily build 1041 now.)

Naomi [import]uid: 67217 topic_id: 34226 reply_id: 144839[/import]