iAds

73 replies [Last post]
walter
User offline. Last seen 1 hour 12 min ago. Offline
Staff
Joined: 22 Jun 2009

We've released prelim support for iAds. Let us know about issues here.

Replies

walter
User offline. Last seen 1 hour 12 min ago. Offline
Staff
Joined: 22 Jun 2009
Naomi
User offline. Last seen 23 hours 21 min ago. Offline
Joined: 6 Jun 2011

Wow, that sounds exciting. Thanks, Walter. Maybe I can add some revenue generating ads to my games now.

Cheers,
Naomi

walter
User offline. Last seen 1 hour 12 min ago. Offline
Staff
Joined: 22 Jun 2009

:)

cublah
User offline. Last seen 7 hours 40 min ago. Offline
Joined: 5 Sep 2010

In the iADs sample, when on the iPad, when you click on the banner the ad rotates to landscape and when you shut the ad the app is rotated wrongly, any work around for this?

ec2
User offline. Last seen 6 days 11 hours ago. Offline
Joined: 27 Jan 2011

Great! I got the Banner ad working easily, but the iBanner just shows the message "Displaying interstitial..." but no full page ad is shown.

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Hi cublah,

I'm looking into it. I'll have an answer soon.

@ec2: that happens from time to time even on the Apple sample code. Although the iAds engine returns that the interstitial was loaded, it actually does not show up. I'm working on a small workaround for that.

Alex

OwenYang
User offline. Last seen 11 hours 4 min ago. Offline
Joined: 22 Jan 2011

oh my god!!!
FINALLY!!!
We have waited for long time!!!
I love u corona!!

ec2
User offline. Last seen 6 days 11 hours ago. Offline
Joined: 27 Jan 2011

@alexf, just for info, I do get the interstitials most of the time on an iPad1 but I never see them on an iPhone4S.

Puzzle Runner
User offline. Last seen 21 hours 33 min ago. Offline
Joined: 8 Feb 2011

@ec2 Interstitials are iPad only.

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Confirming Puzzle Runner, as stated in the API docs the interstitial Ads are iPad only.

Alex.

Bladko
User offline. Last seen 3 hours 13 min ago. Offline
Joined: 14 Dec 2011

how to detect that user is in country that has iAD ?

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Hi Bladko,

Corona offers no direct way to determine that (nor does Apple, except for the clear information that iAd advertisements are currently being served to apps on the U.S., U.K., Germany, Italy, Spain, France, and Japan App Stores).

There are ways to determine in which country a user is (such as IP2C), and if you query their webservice you'll get the country based on the IP address of the user, but that's quite error prone in my opinion (upstream proxies, roaming, etc).

As you probably saw in the test application if you get an error (so also for users that are in countries that do not receive iAds), the ad view is automatically hidden, and at that point you can replace it with some other ad provider or act further depending on your project's logic.

Hope this helps,
Alex.

ale
User offline. Last seen 3 days 4 hours ago. Offline
Joined: 29 Jan 2011

Awesome!!!!!

CoronaLabs Team Rocks!

Ale

Bladko
User offline. Last seen 3 hours 13 min ago. Offline
Joined: 14 Dec 2011

what about system.getPreference( category, name )?

what about error in iad listener ? can we use it to display other ad ?

i have US apple ID but do not residence in US, which country would be used for this ?

Tom

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Won't help either. I can set my country to Japan, and the complete locale to Japanese.

Alex.

Bladko
User offline. Last seen 3 hours 13 min ago. Offline
Joined: 14 Dec 2011

yes but for majority of users this would be enough ?

if country is OK then
---run iAD
---if iAD cannot be run then
-----------try innetractive
else run revmob

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Yes, you can assume that most people will set their country correctly. In which case you run iAd, if their country is not in the list, you move further to other providers.

You can always try to trigger the display of an iAd and if it returns an error, it will return that error to your event listener, so you know that there's no inventory available, which can only be if no ad can be displayed (either because of the user being in the wrong country, or because there's no ad to fill at that specific moment) and then you move further to other providers.

Alex.

Bladko
User offline. Last seen 3 hours 13 min ago. Offline
Joined: 14 Dec 2011

btw can we run both inneractive and iAds at the same time during init ?

ads.init( "iads", bundleID, adListenerIAd )
ads.init( "inneractive", interactive["iPhone"], adListenerInner )

or just before ad show ? This function is CPU consuming ?

Tom

mattchapman
User offline. Last seen 3 days 9 hours ago. Offline
Joined: 18 Jan 2011

I can confirm the iad being clicked on iPad switches mode then when closed screws up the return to portrait...

Anyone figure out a way around this is or is it a backend issue?

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

@mattchapman:

It does the same in the official Apple sample. Working on a workaround for that.

@Tom (bladko): At the moment, go with initing one by one, not both. We're working on multiple init and switch between ad providers.

Alex

J. A. Whye
User offline. Last seen 1 hour 42 min ago. Offline
Joined: 25 Sep 2010

I just added iAds to my game and on the iPhone 4S the landscape problem shows up, but on the iPad 3 the iAds work just fine in landscape.

I know a couple people here have said it fails on their iPads, just wonder if it's a gen 1 vs 2 vs 3 kind of thing.

Jay

J. A. Whye
User offline. Last seen 1 hour 42 min ago. Offline
Joined: 25 Sep 2010

dupe

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Hi everybody,

A quick update about the iAds landscape view rotation issue, it is iOS6 related. Due to the deprecation of certain configuration variables in iAds, the orientation is no longer read properly. I've already tested a couple of solutions, and very soon we'll find a way to fix this.

Thanks for your patience.
Alex.

illustrationism
User offline. Last seen 9 weeks 6 days ago. Offline
Joined: 14 May 2011

I can't load iAds at all, even on the device. I'm running build 2012.996

I know I can't run it in the simulator, but it's not even showing up on the device... Do I have to upload the next version first?

Be nice to see at least something in the simulator, even an empty black box or something.

mattchapman
User offline. Last seen 3 days 9 hours ago. Offline
Joined: 18 Jan 2011

@alexf Have a solution? I am also available for testing.

mattchapman
User offline. Last seen 3 days 9 hours ago. Offline
Joined: 18 Jan 2011

With this portrait to landscape bug still there is it safe to submit to the store with iAds?

thedavebaxter
User offline. Last seen 10 hours 50 min ago. Offline
Joined: 12 Jan 2012

Can someone explain where to put the code please ?

I have it working fine on my titlescreen scene but I have the require ads and ads.init in there.

Is that ok or should the require and init be in main ?

If it's in main, how do I access ads in my titlescreen scene ?

I don't want to display ads anywhere else, just my titlescreen, so maybe I should leave it as is but in the tutorial on the blog it said to put it in Main but as usual doesn't explain everything.

Dave

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Hi Dave,

If you just display the ads on your title screen, it is safe to define the variables local in the titlescreen scene.

@mattchapman: The information Apple provides on iAds is that this orientation problem only happens with test ads, not with actual ads. I would not safe-bet on it, but rather just hold on a bit more until our fix comes out.

We found the problem and we're preparing a fix, the issue was again related to the iOS6 rotation methods that got changed completely, with no documentation updates for iAds whatsoever, and with multiple reports around the web stating that landscape banners are phased out completely in iOS6. More updates on that very soon.

Alex.

thedavebaxter
User offline. Last seen 10 hours 50 min ago. Offline
Joined: 12 Jan 2012

Cheers Alex, will leave as is then.

One thing I haven't seen a full screen ad yet but banners are displaying fine.

I try and display a full screen ad in the Enterscene of the title screen if the user is coming from a different scene (this is so a full screen ad won't display when the game is loaded).

Edit: Forgot to mention am on iPad 1.

Dave

Satheesh
User offline. Last seen 1 day 12 hours ago. Offline
Joined: 25 May 2011

Hi.. Just added iAd to my game..

What I would like to know is, is there anything extra I must do for "testing" iAds?
Or is it that, building with development profile will display test ads and building with distribution profile will display normal ads/

matthias3
User offline. Last seen 3 weeks 15 hours ago. Offline
Joined: 21 Jan 2011

As soon as I display an iAd (banner or interstitial), the multitouch functionality of my app is broken.
It happens only after displaying an iAd.

Even calling "system.activate("multitouch")" does not work. Not even when I call DEactivate("multitouch") before.

Did anybody else experience this problem?

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Hi Matthias,

I'll put this in a testbed and report back with the findings.

Alex.

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

Confirming the above. Multitouch does not work anymore after displaying iAds.

Would you please be so kind to file a bug under http://developer.coronalabs.com/content/bug-submission?

Thanks,
Alex.

matthias3
User offline. Last seen 3 weeks 15 hours ago. Offline
Joined: 21 Jan 2011

Hi Alex,

thanks for comfirming the bug. I will file a bug now.
Can you say something about which priority this bug will become, since the iAds just "slid" into the daily builds more or less by the way.

juan.csdc
User is online Online
Joined: 19 Dec 2011

Hi Alex,

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

1
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

thedavebaxter
User offline. Last seen 10 hours 50 min ago. Offline
Joined: 12 Jan 2012

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 :-(

Dave

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

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

juan.csdc
User is online Online
Joined: 19 Dec 2011

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

AlenB
User offline. Last seen 33 weeks 3 hours ago. Offline
Joined: 29 Sep 2010

Also waiting for the multitouch bug fix..
thx for the info @alexF

haakon
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 19 Jan 2011

@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 })

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

@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.

haakon
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 19 Jan 2011

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.

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

@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

AlenB
User offline. Last seen 33 weeks 3 hours ago. Offline
Joined: 29 Sep 2010

Hi Alex,

many thx for the info!

-Alen

thedavebaxter
User offline. Last seen 10 hours 50 min ago. Offline
Joined: 12 Jan 2012

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) :-)

Dave

haakon
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 19 Jan 2011

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.

nick_sherman
User offline. Last seen 2 days 13 hours ago. Offline
Joined: 23 Sep 2011

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! ;)

haakon
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 19 Jan 2011

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.

haakon
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 19 Jan 2011

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:

alexf
User offline. Last seen 3 hours 30 min ago. Offline
Staff
Joined: 16 Nov 2012

@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.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.