Ios 如果第一个单元格
如果单元格位于第一行,则代码将在下一行中崩溃Ios 如果第一个单元格,ios,swift,facebook,facebook-audience-network,Ios,Swift,Facebook,Facebook Audience Network,如果单元格位于第一行,则代码将在下一行中崩溃 let nativeAdd = nativeAdsManager.nextNativeAd() as FBNativeAd? 我想广告还没准备好。但是是不应该崩溃!!!我试着把它放进果酱里,但没用 func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
let nativeAdd = nativeAdsManager.nextNativeAd() as FBNativeAd?
我想广告还没准备好。但是是不应该崩溃!!!我试着把它放进果酱里,但没用
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
{
if (self.shouldShowAd(indexPath))
{
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(NSStringFromClass(AdCell), forIndexPath: indexPath) as! AdCell
let nativeAdd = nativeAdsManager.nextNativeAd() as FBNativeAd?
if (nativeAdd != nil)
{
cell.setDetails(nativeAdd!)
return cell
}
else
{
return self.createRegularCell(collectionView, cellForItemAtIndexPath: indexPath)
}
}
else
{
return self.createRegularCell(collectionView, cellForItemAtIndexPath: indexPath)
}
}
我也有类似的问题,在点击广告时很少崩溃(该广告位于中的第5个单元格中,使用FBaudenceNetwork iOS SDK 4.26.0和CocoaPods) 致命异常:NSInvalidArgumentException -[FullScreenCatalogViewController NativeAddClick:]:发送到实例0x161ff12d0的选择器无法识别
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x185dabd38 __exceptionPreprocess
1 libobjc.A.dylib 0x1852c0528 objc_exception_throw
2 CoreFoundation 0x185db91f8 __methodDescriptionForSelector
3 UIKit 0x18f573cc4 -[UIResponder doesNotRecognizeSelector:]
4 CoreFoundation 0x185db13f0 ___forwarding___
5 CoreFoundation 0x185c970dc _CF_forwarding_prep_0
6 Black Friday 0x100f446e0 __33-[FBMediaView loadMultiProductAd]_block_invoke_2 (FBMediaView.m:447)
7 Black Friday 0x100f5f9f0 -[FBAdCommandProcessor callCompletionHandlerForCommand:withAdAction:] (FBAdCommandProcessor.m:296)
8 Black Friday 0x100f5f938 -[FBAdCommandProcessor launchURLOutOfApp:withAdAction:] (FBAdCommandProcessor.m:283)
9 Black Friday 0x100f5ec84 -[FBAdCommandProcessor launchAppForEngagement:] (FBAdCommandProcessor.m:164)
10 Black Friday 0x100f5ea2c -[FBAdCommandProcessor processCommand:withExtraData:adDataModel:completionHandler:] (FBAdCommandProcessor.m:142)
11 Black Friday 0x100f444d0 __33-[FBMediaView loadMultiProductAd]_block_invoke.218 (FBMediaView.m:439)
12 Black Friday 0x100f84540 -[FBAdMultiProductView multiProductCellClicked:withPosition:inRect:] (FBAdMultiProductView.m:115)
13 Black Friday 0x100f83b28 -[FBAdMultiProductCell dispatchClickedWithPosition:inRect:] (FBAdMultiProductCell.m:151)
14 Black Friday 0x100f839f0 -[FBAdMultiProductCell gestureRecognizerTappedCell:] (FBAdMultiProductCell.m:129)
15 UIKit 0x18f848f78 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
16 UIKit 0x18f84d4dc _UIGestureRecognizerSendTargetActions
17 UIKit 0x18f337dc8 _UIGestureRecognizerSendActions
18 UIKit 0x18f1ec748 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
19 UIKit 0x18f8373fc _UIGestureEnvironmentUpdate
20 UIKit 0x18f836f88 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
21 UIKit 0x18f8360e4 -[UIGestureEnvironment _updateGesturesForEvent:window:]
22 UIKit 0x18f1eaa54 -[UIWindow sendEvent:]
23 UIKit 0x18f1bc078 -[UIApplication sendEvent:]
24 UIKit 0x18fafbf98 __dispatchPreprocessedEventFromEventQueue
25 UIKit 0x18fafe408 __handleEventQueueInternal
26 UIKit 0x18faf7574 __handleHIDEventFetcherDrain
27 CoreFoundation 0x185d54358 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
28 CoreFoundation 0x185d542d8 __CFRunLoopDoSource0
29 CoreFoundation 0x185d53b60 __CFRunLoopDoSources0
30 CoreFoundation 0x185d51738 __CFRunLoopRun
31 CoreFoundation 0x185c722d8 CFRunLoopRunSpecific
32 GraphicsServices 0x187b03f84 GSEventRunModal
33 UIKit 0x18f21f880 UIApplicationMain
34 Black Friday 0x100e7649c main (main.m:15)
35 libdyld.dylib 0x18579656c start
我也有类似的问题,在点击广告时很少崩溃(该广告位于中的第5个单元格中,使用FBaudenceNetwork iOS SDK 4.26.0和CocoaPods) 致命异常:NSInvalidArgumentException -[FullScreenCatalogViewController NativeAddClick:]:发送到实例0x161ff12d0的选择器无法识别
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x185dabd38 __exceptionPreprocess
1 libobjc.A.dylib 0x1852c0528 objc_exception_throw
2 CoreFoundation 0x185db91f8 __methodDescriptionForSelector
3 UIKit 0x18f573cc4 -[UIResponder doesNotRecognizeSelector:]
4 CoreFoundation 0x185db13f0 ___forwarding___
5 CoreFoundation 0x185c970dc _CF_forwarding_prep_0
6 Black Friday 0x100f446e0 __33-[FBMediaView loadMultiProductAd]_block_invoke_2 (FBMediaView.m:447)
7 Black Friday 0x100f5f9f0 -[FBAdCommandProcessor callCompletionHandlerForCommand:withAdAction:] (FBAdCommandProcessor.m:296)
8 Black Friday 0x100f5f938 -[FBAdCommandProcessor launchURLOutOfApp:withAdAction:] (FBAdCommandProcessor.m:283)
9 Black Friday 0x100f5ec84 -[FBAdCommandProcessor launchAppForEngagement:] (FBAdCommandProcessor.m:164)
10 Black Friday 0x100f5ea2c -[FBAdCommandProcessor processCommand:withExtraData:adDataModel:completionHandler:] (FBAdCommandProcessor.m:142)
11 Black Friday 0x100f444d0 __33-[FBMediaView loadMultiProductAd]_block_invoke.218 (FBMediaView.m:439)
12 Black Friday 0x100f84540 -[FBAdMultiProductView multiProductCellClicked:withPosition:inRect:] (FBAdMultiProductView.m:115)
13 Black Friday 0x100f83b28 -[FBAdMultiProductCell dispatchClickedWithPosition:inRect:] (FBAdMultiProductCell.m:151)
14 Black Friday 0x100f839f0 -[FBAdMultiProductCell gestureRecognizerTappedCell:] (FBAdMultiProductCell.m:129)
15 UIKit 0x18f848f78 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
16 UIKit 0x18f84d4dc _UIGestureRecognizerSendTargetActions
17 UIKit 0x18f337dc8 _UIGestureRecognizerSendActions
18 UIKit 0x18f1ec748 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
19 UIKit 0x18f8373fc _UIGestureEnvironmentUpdate
20 UIKit 0x18f836f88 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
21 UIKit 0x18f8360e4 -[UIGestureEnvironment _updateGesturesForEvent:window:]
22 UIKit 0x18f1eaa54 -[UIWindow sendEvent:]
23 UIKit 0x18f1bc078 -[UIApplication sendEvent:]
24 UIKit 0x18fafbf98 __dispatchPreprocessedEventFromEventQueue
25 UIKit 0x18fafe408 __handleEventQueueInternal
26 UIKit 0x18faf7574 __handleHIDEventFetcherDrain
27 CoreFoundation 0x185d54358 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
28 CoreFoundation 0x185d542d8 __CFRunLoopDoSource0
29 CoreFoundation 0x185d53b60 __CFRunLoopDoSources0
30 CoreFoundation 0x185d51738 __CFRunLoopRun
31 CoreFoundation 0x185c722d8 CFRunLoopRunSpecific
32 GraphicsServices 0x187b03f84 GSEventRunModal
33 UIKit 0x18f21f880 UIApplicationMain
34 Black Friday 0x100e7649c main (main.m:15)
35 libdyld.dylib 0x18579656c start
你能发布你得到的任何错误信息/代码吗?日志中有什么指示崩溃发生的地方?你得到修复了吗@LudaCan您是否发布了您收到的任何错误消息/代码?日志显示了崩溃发生的位置?您是否修复了它@LudaI正在使用FBaudenceNetwork iOS SDK 4.26.0,在收到大量崩溃报告后更新到4.26.1,等着看情况如何。我正在使用FBaudenceNetwork iOS SDK 4.26.0,在收到大量崩溃报告后更新到4.26.1,等着看情况如何。