我有一个应用程序以Apple提供的“iAd Suite”推荐的方式实现iAds,但是当我在iOS 4.3.3上使用iPhone运行应用程序时,我会遇到一些奇怪的行为
具体来说,虽然我实现了委托并实现了以下方法
#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
{
}
我间歇性地收到了这个错误。
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'
有没有人见过这种奇怪的东西?我注意到的另一件事是我可以使用模拟器(不是版本的iPhone 4.0,4.1,4.2)使它失败..这只发生在我安装到我的实际设备或在4.3.3模拟器上运行时