SpriteKit中的GameCenter排行榜导致错误

时间:2014-04-21 17:59:24

标签: ios objective-c sprite-kit unrecognized-selector game-center-leaderboard

我在Sprite Kit中完成了游戏,现在正试图在GameCenter的排行榜中存储高分。我遵循了一些非spritekit项目的教程。我的错误的步骤:

  1. 我调试我的应用程序没有任何错误,一些警告,但它们没有任何伤害。
  2. 应用程序运行良好,我的首发SKActions工作完美无缺。
  3. 我成功登录GameCenter。
  4. 当我触摸屏幕时,它会冻结并给我一个“Missed Method”日志错误和“Thread 1:EXC_BAD_ACCESS(code = 1,address = 0x80000012)”。每当我删除导致BAD_ACESS错误的代码行时,它会弹出我代码中的其他位置。
  5. 我的日志:

    2014-04-21 19:51:26.893 Sharky[3417:60b] Missed Method
    2014-04-21 19:51:27.683 Sharky[3417:60b] -[NSMethodSignature copyWithZone:]: unrecognized selector sent to instance 0xacbdc20
    2014-04-21 19:51:27.685 Sharky[3417:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSMethodSignature copyWithZone:]: unrecognized selector sent to instance 0xacbdc20'
    *** First throw call stack:
    (
        0   CoreFoundation                      0x0009c1e4 __exceptionPreprocess + 180
        1   libobjc.A.dylib                     0x019978e5 objc_exception_throw + 44
        2   CoreFoundation                      0x00139243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
        3   CoreFoundation                      0x0008c50b ___forwarding___ + 1019
        4   CoreFoundation                      0x0008c0ee _CF_forwarding_prep_0 + 14
        5   libobjc.A.dylib                     0x019a9bcd -[NSObject copy] + 41
        6   SpriteKit                           0x01481f4c -[SKNode runAction:] + 55
        7   Sharky                              0x0000595c -[MyScene touchesBegan:withEvent:] + 476
        8   SpriteKit                           0x014702bf -[SKView touchesBegan:withEvent:] + 824
        9   UIKit                               0x00576c0b -[UIWindow _sendTouchesForEvent:] + 386
        10  UIKit                               0x005779d1 -[UIWindow sendEvent:] + 1117
        11  UIKit                               0x005495f2 -[UIApplication sendEvent:] + 242
        12  UIKit                               0x00533353 _UIApplicationHandleEventQueue + 11455
        13  CoreFoundation                      0x0002577f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
        14  CoreFoundation                      0x0002510b __CFRunLoopDoSources0 + 235
        15  CoreFoundation                      0x000421ae __CFRunLoopRun + 910
        16  CoreFoundation                      0x000419d3 CFRunLoopRunSpecific + 467
        17  CoreFoundation                      0x000417eb CFRunLoopRunInMode + 123
        18  GraphicsServices                    0x03a7f5ee GSEventRunModal + 192
        19  GraphicsServices                    0x03a7f42b GSEventRun + 104
        20  UIKit                               0x00535f9b UIApplicationMain + 1225
        21  Sharky                              0x0000a472 main + 130
        22  libdyld.dylib                       0x023e4701 start + 1
        23  ???                                 0x00000001 0x0 + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    (lldb)
    

    有没有人知道最新情况?或者是否有人有关于如何将GameCenter排行榜集成到精灵工具包项目中的分步教程?

0 个答案:

没有答案