我试图让Appodeal sdk在我的游戏中运行。
func showInterstitial(){
let inter = AppodealShowStyle.Interstitial
Appodeal.showAd(inter, rootViewController: self)
}
我的GameViewController中的方法是否试图从GameScene调用。当我从GameViewController本身调用它时没有问题。
我在控制台收到一条非常长的消息:
2016-06-05 15:54:29.257 3 [95692:2076512]呈现插页式异常抛出异常:尝试添加已有父级的SKNode:name:'(null)'文本:' 1'的fontName:'富利'位置:{384,974}带痕:( 0 CoreFoundation 0x04fc5494 exceptionPreprocess + 180 1 libobjc.A.dylib 0x0731fe02 objc_exception_throw + 50 2 CoreFoundation 0x04fc53bd + [NSException raise:format:] + 141 3 SpriteKit 0x07176953 - [SKNode insertChild:atIndex:] + 182 4 SpriteKit 0x0717687b - [SKNode addChild:] + 84 5 3 0x00034a38 _TFC1_9GameScene13didMoveToViewfCSo6SKViewT_ + 7240 6 3 0x00034c5d _TToFC1_9GameScene13didMoveToViewfCSo6SKViewT_ + 61 7 SpriteKit 0x071442c1 - [SKScene _didMoveToView:] + 217 8 SpriteKit 0x0716433d - [SKView presentScene:] + 592 9 3 0x00031dd8 _TFC1_18GameViewController11viewDidLoadfT_T_ + 824 10 3 0x00031eb2 _TToFC1_18GameViewController11viewDidLoadfT_T_ + 34 11 UIKit 0x0268cb72 - [UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 44 12 UIKit 0x02691692 - [UIViewController loadViewIfRequired] + 1384 13 UIKit 0x02691ab1 - [UIViewController视图] + 35 14 UIKit 0x026a5c7c - [UIViewController _presentViewController:withAnimationController:completion:] + 3881 15 UIKit 0x026a940f __62- [UIViewController presentViewController:animated:completion:] _ block_invoke + 397 16 UIKit 0x026a9754 - [UIViewController _performCoordinatedPresentOrDismiss:animated:] + 493 17 UIKit 0x026a923b - [UIViewController presentViewController:animated:completion:] + 182 18 3 0x006afc39 GADCategories_GADSlot_Mediation + 16778 19 3 0x0067c5a9 GADCategories_NSString_GADPathValidation + 31687 20 3 0x006fc09f GADAbsoluteTimeMilliseconds + 3657 21 3 0x0069d1c5 GADCategories_DFPBannerView_CustomRenderedAd + 17414 22 3 0x00111885 - [AppodealAdMobInterstitialAdapter presentFromRootViewController:] + 81 23 3 0x0007f6fa - [AppodealModalAdMediator presentModalAdapterFromViewController:] + 250 24 3 0x0007fcc3 - [AppodealModalAdMediator presentFromRootViewController:] + 368 25 3 0x0007a842 - [AppodealInterstitialAdManager presentWithRootViewController:] + 386 26 3 0x000a0564 - [AppodealSdk presentInterstitialFromRootViewController:] + 94 27 3 0x00062b6d + [Appodeal showAd:rootViewController:] + 133 28 3 0x00031943 _TFC1_18GameViewController16showInterstitialfT_T_ + 131 29 3 0x00037a2a _TFC1_9GameScene12touchesBeganfTGVs3SetCSo7UITouch_9withEventGSqCSo7UIEvent__T_ + 5994 30 3 0x00038040 _TToFC1_9GameScene12touchesBeganfTGVs3SetCSo7UITouch_9withEventGSqCSo7UIEvent__T_ + 128 31 SpriteKit 0x07162866 - [SKView touchesBegan:withEvent:] + 1093 32 UIKit 0x025432af - [UIWindow _sendTouchesForEvent:] + 456 33 UIKit 0x025445cc - [UIWindow sendEvent:] + 1159 34 UIKit 0x024e5be8 - [UIApplication sendEvent:] + 266 35 UIKit 0x024ba769 _UIApplicationHandleEventQueue + 7795 36 CoreFoundation 0x04ed7e5f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 15 37 CoreFoundation 0x04ecdaeb __CFRunLoopDoSources0 + 523 38 CoreFoundation 0x04eccf08 __CFRunLoopRun + 1032 39 CoreFoundation 0x04ecc846 CFRunLoopRunSpecific + 470 40 CoreFoundation 0x04ecc65b CFRunLoopRunInMode + 123 41 GraphicsServices 0x08708664 GSEventRunModal + 192 42 GraphicsServices 0x087084a1 GSEventRun + 104 43 UIKit 0x024c0eb9 UIApplicationMain + 160 44 3 0x0002b811 main + 145 45 libdyld.dylib 0x0815aa25 start + 1 ) 2016-06-05 19:54:29 +0000 [Appodeal 0.10.6] [错误] [AppodealAdQueue]刷新广告队列时出错:错误Domain = com.appodeal Code = 708610"来自服务器的错误消息:& #34; UserInfo = {NSLocalizedDescription =来自服务器的错误消息:} 2016-06-05 19:54:40 +0000 [Appodeal 0.10.6] [错误] [AppodealAdQueue]刷新广告队列时出错:错误Domain = com.appodeal Code = 708610"来自服务器的错误消息:& #34; UserInfo = {NSLocalizedDescription =来自服务器的错误消息:} 2016-06-05 19:55:02 +0000 [Appodeal 0.10.6] [错误] [AppodealAdQueue]刷新广告队列时出错:错误Domain = com.appodeal Code = 708610"来自服务器的错误消息:& #34; UserInfo = {NSLocalizedDescription =来自服务器的错误消息:} 游戏结束 speed1.1 speed1.0 2016-06-05 19:55:42 +0000 [Appodeal 0.10.6] [错误] [AppodealAdQueue]刷新广告队列时出错:错误Domain = com.appodeal Code = 708610"来自服务器的错误消息:& #34; UserInfo = {NSLocalizedDescription =来自服务器的错误消息:} 2016-06-05 19:57:03 +0000 [Appodeal 0.10.6] [错误] [AppodealAdQueue]刷新广告队列时出错:错误Domain = com.appodeal Code = 708610"来自服务器的错误消息:& #34; UserInfo = {NSLocalizedDescription =从服务器收到错误消息:}