Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to User contributions

[iPhone] adWhirl/iAd working solution

Re: [iPhone] adWhirl/iAd working solution

Postby Markuzzzz » 10 Oct 2010, 19:04

Markuzzzz
Platinum Boarder
Platinum Boarder
 
Posts: 577
Location: Netherlands

Re: [iPhone] adWhirl/iAd working solution

Postby Markuzzzz » 13 Oct 2010, 11:43

this seems to do the trick

Code: Select all
#define degreesToRadians(x) (M_PI * x / 180.0)
//-----------------------------------------------------------------------------
-(void)showAdWhirlView
{
   if(awView)
   {
      [awView removeFromSuperview ];
      awView = nil;
   }
   
   awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
   
   CGAffineTransform xform = CGAffineTransformMakeRotation ( degreesToRadians ( -90.0f ) ) ;
   awView.frame        = CGRectMake( 50 , 136, 320, 50 ) ;
   awView.transform    = xform ;
   [self addSubview:awView];
   
   bAdWhirlViewVisible = YES;
   return;
}


I added this to the test app example. One thing that still isn't ok is the click of iAd. Normally the whole ad is clickable but now on the beginning is. Anyone having the same problem??
Markuzzzz
Platinum Boarder
Platinum Boarder
 
Posts: 577
Location: Netherlands

Re: [iPhone] adWhirl/iAd working solution

Postby fzuleta » 23 Sep 2011, 05:57

hi! first of all thanks for this contribution ^^

---------------------
EDIT:::: I finally managed to do it ^^ just went comparing each file in the classes, from the sample to the UATb16 project, and it seems to be working ok, at least im getting test ads ^^
---------------------


the thing is, what I'm doing is going through the sample file supplied, going through the classes and basically mirroring whats going on inside to the project generated by UAT beta 16 (the reason is that the app is universal and openfeint, furry, InApp purchases, didnt seem to work on the sample)
Its working great! ads are loading, clicking loads them up, its great, the step i'm stuck in is when I try to toggle their visibility. Clicking on the toggle button, crashes the app

2011-09-25 10:09:38.515 game[2966:707] -[S3DEngine_AppDelegate mainViewController]: unrecognized selector sent to instance 0xc71960
2011-09-25 10:09:38.626 game[2966:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[S3DEngine_AppDelegate mainViewController]: unrecognized selector sent to instance 0xc71960'
*** Call stack at first throw:
(
0 CoreFoundation 0x35a0564f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x34fe3c5d objc_exception_throw + 24
2 CoreFoundation 0x35a091bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x35a08649 ___forwarding___ + 508
4 CoreFoundation 0x3597f180 _CF_forwarding_prep_0 + 48
5 game 0x00004064 game + 12388
6 game 0x0000e8a0 game + 55456
7 game 0x006665ab _ZN17OFKnownCredentialC2EP8NSStringS1_S1_S1_ + 448362
8 game 0x00653ead _ZN17OFKnownCredentialC2EP8NSStringS1_S1_S1_ + 372844
9 Foundation 0x3700d6d5 __NSFireDelayedPerform + 368
10 CoreFoundation 0x359dca47 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
11 CoreFoundation 0x359deecb __CFRunLoopDoTimer + 850
12 CoreFoundation 0x359df845 __CFRunLoopRun + 1088
13 CoreFoundation 0x3596fec3 CFRunLoopRunSpecific + 230
14 CoreFoundation 0x3596fdcb CFRunLoopRunInMode + 58
15 GraphicsServices 0x3459641f GSEventRunModal + 114
16 GraphicsServices 0x345964cb GSEventRun + 62
17 UIKit 0x345cdd69 -[UIApplication _run] + 404
18 UIKit 0x345cb807 UIApplicationMain + 670
19 game 0x000036b4 game + 9908
20 game 0x00003668 game + 9832
)
terminate called after throwing an instance of 'NSException'


it also opens this textfile in __pthread_kill_disassembly_0x368c8a1c.nasm it highlights in green 0x368c8a1c <+0008> bcc 0x368c8a34 <__pthread_kill+32> and it says Program received signal: "SIGABRT".



well any help is most appreciated! so thanks :)

---- EDIT::::::::::::
Again, its working perfectly now :)
solution: mirror whats going on in Xcode sample file, with UAT project export
---------------------
User avatar
fzuleta
Senior Boarder
Senior Boarder
 
Posts: 79

Previous

Return to User contributions