iAd Banner - Technical only

Previous topic - Next topic

trucidare

i got kungphoos glbasic view and changed the singleton to my own objC class.

EDIT:// download in this post

[attachment deleted by admin]
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

baicskillet

Quote from: matchy on 2010-Jul-21
Sounds good trucidare.  :) I can't get mousestate.  :'( How did you fix it?

Code (glbasic) Select

// --------------------------------- //
// Project: iAdTest
// Start: Friday, June 25, 2010
// IDE Version: 8.002

REQUIRE "import.c"
IMPORT "C" int GLB_iAd_Init()

Animate()

FUNCTION Animate:
LOCAL mx,mx,b1,b2

GLB_iAd_Init()
WHILE TRUE
MOUSESTATE mx,my,b1,b2
DRAWRECT 0,50,320,100,RGB(0,255,0)
PRINT "GLB: Hello iAd world!",10,60+SIN(GETTIMERALL()*0.1)*10
DRAWRECT mx-10,mx-10,20,20,RGB(255,0,0)
SHOWSCREEN
WEND
ENDFUNCTION


This code here is slightly different from the one available for download.  I think it has an additional mousestate command.  Which one is the final one?

baicskillet

Oh, and I dont know where to find those iad and CoreGraphics Frameworks.

baicskillet

Quote from: trucidare on 2010-Jul-21
i got kungphoos glbasic view and changed the singleton to my own objC class.

EDIT:// download in this post

Does this wrapper replace matchy's glb_iad solution?

trucidare

it is a standalone lib. read Readme.txt for function names.
it is matchys idea with my patch for get input working
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

baicskillet

Quote from: trucidare on 2010-Jul-21
it is a standalone lib. read Readme.txt for function names.
it is matchys idea with my patch for get input working

Could you walk me through adding it? The readme shows three functions, GLB_iad, GLB_iad_hide and GLB_iad_show.  I added them to my game.  Do i need to include that libiad.a file too? And how do i do that if it's needed?  Are these functions related to the GLB_iad_init one from matchy's solution? And they are void instead of int like GLB_iad_init.

matchy

baicskillet, add the existing framework and lib in xcode!
trucidare, I tried out the lib and the result was I there was mousestate feedback and the banner frame slides nicely.
Although there is no advert text or image in the banner test frame (server issue), there now is no response when tapping the advert.

Code (glbasic) Select

//iAd Banner Lib Test
//undelcared variables are psuedo

IMPORT "C" void GLB_iAd()
IMPORT "C" void GLB_iAd_Hide() // to hide the banner
IMPORT "C" void GLB_iAd_Show() // to show banner after hide

GLB_iAd()
WHILE TRUE
if time_to_show
GLB_iAd_Show()
elseif time_to_hide
GLB_iAd_Hide()
endif
PRINT banner_state,0,0
SHOWSCREEN
WEND

trucidare

thats why i hide it automaticaly. it will be shown if the ad was loaded. then its clickable.
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

I don't see any test ad images at the moment, just he frame with iAd logo. Should I be seeing the test ad as it does seem to load it?

trucidare

you need to have wifi on
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

I am on WiFi! Are you getting test ads?

trucidare

not tested last days, but before i got the Apple Test Add and on click i got the Voila it works thing ;)
if the iAd frame is shown, iAd works fine, but not receiving the Ad from apple i think.

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

Yeah I'll try it some other time again as the frame is working fine.  :booze:

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

baicskillet

#29
Quote from: matchy on 2010-Jul-22
baicskillet, add the existing framework and lib in xcode!
trucidare, I tried out the lib and the result was I there was mousestate feedback and the banner frame slides nicely.
Although there is no advert text or image in the banner test frame (server issue), there now is no response when tapping the advert.

Code (glbasic) Select

//iAd Banner Lib Test
//undelcared variables are psuedo

IMPORT "C" void GLB_iAd()
IMPORT "C" void GLB_iAd_Hide() // to hide the banner
IMPORT "C" void GLB_iAd_Show() // to show banner after hide

GLB_iAd()
WHILE TRUE
if time_to_show
GLB_iAd_Show()
elseif time_to_hide
GLB_iAd_Hide()
endif
PRINT banner_state,0,0
SHOWSCREEN
WEND


Yeah, I figured that out on xcode. I added that iad .a file to the lib folder in glbasic too.  Is that routine in your post for displaying and hiding the ads? It only has GLB_iAd_Hide, GLB_iAd_Show and GLB_iAd.  There's no GLB_iAd_Init.