Author Topic: iAd Banner - Technical only  (Read 41711 times)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
iAd Banner - Technical only
« on: 2010-Jun-28 »
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
« Last Edit: 2011-Apr-28 by Kitty Hello »

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 930
  • KodeSource
    • View Profile
    • KodeSource
Re: iAd Banner - Technical only
« Reply #1 on: 2010-Jun-28 »
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]

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: iAd Banner - Technical only
« Reply #2 on: 2010-Jun-29 »
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!

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 930
  • KodeSource
    • View Profile
    • KodeSource
Re: iAd Banner - Technical only
« Reply #3 on: 2010-Jun-29 »
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]

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iAd Banner - Technical only
« Reply #4 on: 2010-Jul-05 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iAd Banner - Technical only
« Reply #5 on: 2010-Jul-06 »
Does it work at the bottom, too?

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iAd Banner - Technical only
« Reply #6 on: 2010-Jul-06 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iAd Banner - Technical only
« Reply #7 on: 2010-Jul-06 »
Excellent. I might try to use it in the bottom of the ScribbleMP/Settings dialog.

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
Re: iAd Banner - Technical only
« Reply #8 on: 2010-Jul-08 »
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!

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: iAd Banner - Technical only
« Reply #9 on: 2010-Jul-08 »
The issue I found that I was unable to get the GLB screen mouse response after closing the iAd.  :'(

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iAd Banner - Technical only
« Reply #10 on: 2010-Jul-08 »
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

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
Re: iAd Banner - Technical only
« Reply #11 on: 2010-Jul-08 »
So, as far as I undestand, is totally usable now?
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iAd Banner - Technical only
« Reply #12 on: 2010-Jul-08 »
it is
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

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iAd Banner - Technical only
« Reply #13 on: 2010-Jul-21 »
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

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: iAd Banner - Technical only
« Reply #14 on: 2010-Jul-21 »
Sounds good trucidare.  :) I can't get mousestate.  :'( How did you fix it?

« Last Edit: 2010-Jul-22 by matchy »