iOS游戏中的Nextpeer在第一行崩溃:NSNull长度

时间:2013-05-10 18:44:55

标签: iphone ios cocos2d-iphone nextpeer

iOS中的Nextpeer在第一行sdk初始化中崩溃。 SDK版本:1.4.9

代码:

[Nextpeer initializeWithProductKey:@"HERE USED GAME KEY FROM NEXTPEER"
                           andSettings:settings
                          andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self]];

崩溃日志:

[NSNull length]: unrecognized selector sent to instance 0x3760678
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x3760678'
*** First throw call stack:
(0x362f012 0x28cce7e 0x36ba4bd 0x361ebbc 0x361e94e 0x23bdefc 0x23bde42 0x23be195 0x126708 0x126368 0x28e06b0 0x16a602 0x28e06b0 0x17b203 0x28e06b0 0x230c765 0x35b2f3f 0x35b296f 0x35d5734 0x35d4f44 0x35d4e1b 0x30a67e3 0x30a6668 0x1810ffc 0x17ad6 0x2fe5)
libc++abi.dylib: terminate called throwing an exception

如何解决此问题?缺少要添加的任何框架?

2 个答案:

答案 0 :(得分:0)

好的,这只发生在模拟器中,在真正的iPhone中运行良好。

一切都很顺利。但是几天前,nextpeer也在模拟器中工作,但现在还没有。

答案 1 :(得分:0)

您应该联系他们的支持团队(nextpeer.com的支持)。 顺便说一句,您是否添加了“其他链接器标志”(-ObjC,-all_load)?

来自Nextpeer的文档: 在项目配置中,在“链接”下 - >其他链接器标志为所有配置添加以下标志:

-ObjC -all_load