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]

Hi Alex,

I’m trying to use iAds on iPad, but when I set the property y=40 like:

ads.show("banner", {x=0, y=40, testMode=false});  

The banner is well positioned on iphone, but it is some pixels above on iPad, and on the iPad retina I have the same problems, but this time the distance between the real position and wanted position is minor.

Is this happening to anyone else?

Thanks for your help

Juan Cruz [import]uid: 112380 topic_id: 34226 reply_id: 141610[/import]

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

Yeah I had the same problem, I used y=display.contentHeight in the end and that put the banner right at the bottom on all devices.

So maybe you can do something using display.contentHeight to make it look right.

Just waiting for Multitouch to be fixed now :frowning:

Dave [import]uid: 117617 topic_id: 34226 reply_id: 141667[/import]

Hi guys,

@thedavebaxter: the multitouch bug will most probably be solved in tomorrow’s daily build.

@juan.cdc: which type of content scaling are you using? zoomEven? letterBox?

Alex [import]uid: 196533 topic_id: 34226 reply_id: 141674[/import]

Hi Alex,

I’m using letterBox, and using the configuration mention on this blog post:

www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

I haven’t seen this error before submiting the app to apple, and Apple rejected it, they comment was that the ad space was misplaced, and that also sometimes the ads are just a white square, is this the common behavior when the ad fails to load?

Thanks for your support
Best regards

Juan Cruz [import]uid: 112380 topic_id: 34226 reply_id: 141675[/import]

Also waiting for the multitouch bug fix…
thx for the info @alexF [import]uid: 9592 topic_id: 34226 reply_id: 141834[/import]

@alexf, what happened to the rotation bug fix? It’s definately not working in the latest daily enterprise build. Also the positioning is freaky, on iPad we have to position the banner -20 on the x axis to use the whole screen width.

iads.show(“banner”, { x = iPad and -20 or 0, y = screenB - (iPad and 10 or 20), testMode = true }) [import]uid: 21746 topic_id: 34226 reply_id: 141896[/import]

@haakon:

both the rotation and the multitouch bugs have been fixed in the latest enterprise build (1024).

Which iOS and orientation are you having the -20 problem on? Tried 6.0 in portrait and landscape and could not replicate…

AlenB, thedavebaxter, everybody: the last Corona SDK daily build (1024) also fixes the rotation and the multitouch bugs.

Thank you for your patience, and please let me know case anything should still be wrong.
Alex. [import]uid: 196533 topic_id: 34226 reply_id: 141955[/import]

Cool, will check it out immediately.

Found this bug too, btw, is that handled as well in the new build?

If iAd is unable to show an ad (an error occurs), a white frame is displayed in the view. Since you have used the Apple example project when creating the plugin, this bug happens:

In Apples example, they move the ad frame (the white frame) -50px on the y axis to get it off the screen. That’s cool as long as banners are shown at the top of the screen. In our case, we’re showing banners at the bottom of the screen, so when this happens (which is very often), a white frame pops up 50 px above the bottom of the screen. [import]uid: 21746 topic_id: 34226 reply_id: 141956[/import]

@haakon:

We actually did not use anything from the Apple’s example in creating the plugin. We just looked at the Apple examples to see if the bugs we found are replicable in there as well.

In the actual implementation, the view is hidden if the delegate method returns an error upon loading the ad. So if you have a white frame on the screen, then the delegate method does not return an error.

I’ll look into this.

Alex [import]uid: 196533 topic_id: 34226 reply_id: 141957[/import]

Hi Alex,

many thx for the info!

-Alen [import]uid: 9592 topic_id: 34226 reply_id: 141961[/import]

Just to let everyone know, my app was approved yesterday using iAds. I only display a banner across the bottom of the titlescreen and it’s a portrait app.

Sending a update today with MultiTouch enabled (just test on device and working fine) :slight_smile:

Dave [import]uid: 117617 topic_id: 34226 reply_id: 141962[/import]