Gamecenter ios 9 GameCenter GKLocalPlayerListener methods not called

后端 未结 4 629
半阙折子戏
半阙折子戏 2020-12-06 08:05

This is about GameCenter.

Since \"the GKLocalPlayerListener protocol inherits the methods from GKChallengeListener, GKI

4条回答
  •  情书的邮戳
    2020-12-06 08:30

    I don't have the a reputation high enough to comment on Thunks answer but I can submit my own, so that is how I will get this out info out there. The biggest part of the problem is that there is no examples of how to use this code and the documentation is lacking. So, code not firing is not proof that the code is broken, just that we don't know how to use it.

    But based upon the statements that Thunk is making I was able to get the player:didModifySavedGame and player:hasConflictingSavedGames which he says that he has never seen them fire.

    These are the methods to the GKSavedGameListener madness. the problem I was having with this protocol is that it does not have a delegate to assign it, so I can pick any class in my program and make it conform to this protocol and then expect the methods to fire, which seemed unlikely. So I needed some sort of a delegate to say which class conformed.

    I found that by setting the localPlayer.registerListener(self) where self is the conforming class I get them to fire.

    So double check any methods that are not firing with this set and let us know if it works better.

提交回复
热议问题