iAd Banner - Technical only

Previous topic - Next topic

matchy

Here is a video and source test for Apple's iAd Banner with GLB.  :good:
http://www.youtube.com/watch?v=ndQYcpnGTGQ

Easy to implement and works for portrait and landscape rotatable, so room for these function parameters. The only small objc issue is if I set the banner at the bottom of the screen, it jumps back to the top after viewing the ad.  :sick:

Update: my file removed...used trucidare's!

[UPDATE]
Latest version seems here:
http://www.glbasic.com/forum/index.php?topic=5932.new;topicseen#new

Slydog

Wow, amazing! 
I was going to have to figure this out on my own!

I took a look at your code, it seems easy to implement.
But, I'm not quite sure how to use it.

Do I call 'GLB_iAd_Init()' just before I want to display an iAd?
For example, call it on a loading screen.
But then how do I clear it when the level is ready?
I noticed the 'GLB_iAd_Init()' call is outside of your SHOWSCREEN loop.

And, does it automatically revert to an actual iAd (not a 'testing' ad) when deployed to iTunes?

Thanks,
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

matchy

Slydog, please have a go at implementing it as it is very easy. It's seems that when iAd Banner is initialized it stays there and can't be removed. It's early days, so I don't know much about it. I'm hoping we can work this one out!

Slydog

Thanks. 
I was researching it a bit, and it does get complicated, for something that seems so easy.

I found this page on apple.com:
http://developer.apple.com/iPhone/library/documentation/UserExperience/Conceptual/iAd_Guide/WorkingwithBannerViews/WorkingwithBannerViews.html#//apple_ref/doc/uid/TP40009881-CH4-DontLinkElementID_21

It gets into how to handle ads that don't return anything, and how to handle a banner touch.
In the error handling, it has a line:
Code (glbasic) Select
self.bannerIsVisible = NO;
So this is maybe how we hide it when not needed anymore.
It mentions 'self', which I assume is referring to the iAd instance?

But, since I've never even loaded XCode yet, or touched Objective C, I've got a lot of learning ahead!
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

trucidare

Have iAd working with touch after closing the ad.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

Does it work at the bottom, too?

trucidare

it work whereever you want.
have to add position markers for that.

at the moment i placed it on top and it is shown after an ad is loaded, so no empty iad frame is visible.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

Excellent. I might try to use it in the bottom of the ScribbleMP/Settings dialog.

kaotiklabs

glad to ear about this.
Will be great for lite apps!

How is going?
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

matchy

The issue I found that I was unable to get the GLB screen mouse response after closing the iAd.  :'(

trucidare

matchy this is fixed now ;)
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

kaotiklabs

So, as far as I undestand, is totally usable now?
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

trucidare

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

trucidare

oops i´m old :( forgot to release the corrected lib from matchy.
i will later this day
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

matchy

#14
Sounds good trucidare.  :) I can't get mousestate.  :'( How did you fix it?