Gamecenter authentication issue

旧城冷巷雨未停 提交于 2019-12-03 13:21:20

The solution for my game was quite strange (I don't understand it completely myself). By moving the call to [self authorizeLocalPlayer] until later in the lifecycle, such as when I first initialize the SKScene, rather than early in -(void)viewDidLoad, it prevented this crash.

I believe this has to do with an issue with threads, but I cannot be sure. Some changes I made to code, that seemed unrelated, having to do with multithreading caused this to break again (I had to change a call to performSelector:withObject:afterDelay: to [NSTimer scheduledTimerWith...].

Basically, this is a very hard to track down issue, that requires some messing around with. Sorry I could not be more specific :(

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!