I've got an app that implements iAds in the way recommended in the "iAd Suite" that Apple provides, but I'm getting some strange behavior when I run the app on my iPhone with iOS 4.3.3
Specifically, although I implement the delegate and implement the following methods
#pragma mark ADBannerViewDelegate methods
-(void)bannerViewDidLoadAd:(ADBannerView *)banner
{
//NSLog(@"LOADING AN AD");
[self layoutForCurrentOrientation:YES];
}
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
[self layoutForCurrentOrientation:YES];
}
-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
return YES;
}
-(void)bannerViewActionDidFinish:(ADBannerView *)banner
{
}
I'm intermittently getting this error.
2011-05-07 16:08:42.207 colescorner[3344:707] -[UIPanGestureRecognizer bannerView:didFailToReceiveAdWithError:]: unrecognized selector sent to instance 0x1c4c70
2011-05-07 16:08:42.387 colescorner[3344:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPanGestureRecognizer bannerView:didFailToReceiveAdWithError:]: unrecognized selector sent to instance 0x1c4c70'
*** Call stack at first throw:
(
0 CoreFoundation 0x317ac64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x352c7c5d objc_exception_throw + 24
2 CoreFoundation 0x317b01bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x317af649 ___forwarding___ + 508
4 CoreFoundation 0x31726180 _CF_forwarding_prep_0 + 48
5 iAd 0x34fbd785 -[ADBannerView _sanitizeAndForwardErrorToDelegate:] + 44
6 iAd 0x34fbbc55 -[ADBannerView controller:didFailWithError:] + 152
7 iAd 0x34fc659d -[ADBannerController unloadAndClose] + 60
8 iAd 0x34fc04a1 -[ADSession createSession] + 444
9 iAd 0x34fbffe7 -[ADSession considerCreatingSessions] + 270
10 iAd 0x34fbfa55 __-[ADSession considerCreatingSessions]_block_invoke_2 + 16
11 libdispatch.dylib 0x360928e7 _dispatch_call_block_and_release + 10
12 libdispatch.dylib 0x3608e771 _dispatch_after_timer_callback + 12
13 libdispatch.dylib 0x36090341 _dispatch_source_invoke + 436
14 libdispatch.dylib 0x3608e041 _dispatch_queue_invoke + 92
15 libdispatch.dylib 0x3608e1c3 _dispatch_main_queue_callback_4CF$VARIANT$up + 262
16 CoreFoundation 0x3178693b __CFRunLoopRun + 1334
17 CoreFoundation 0x31716ec3 CFRunLoopRunSpecific + 230
18 CoreFoundation 0x31716dcb CFRunLoopRunInMode + 58
19 GraphicsServices 0x3109541f GSEventRunModal + 114
20 GraphicsServices 0x310954cb GSEventRun + 62
21 UIKit 0x3183cd69 -[UIApplication _run] + 404
22 UIKit 0x3183a807 UIApplicationMain + 670
23 myapp 0x0000212d main + 48
24 myapp 0x000020f8 start + 40
)
terminate called after throwing an instance of 'NSException'
Has anyone seen this type of weirdness? The other thing I notice is that I CAN get it to fail using the Simulator (not version iPhone 4.0, 4.1, 4.2).. this ONLY happens when I install to my actual device or run it on the 4.3.3 simulator
User contributions licensed under CC BY-SA 3.0