ios - removeWithCompletionHandler causes logging out of Game Center -


When the center is needed (to avoid extra loading burden, I want to keep the minimum number of matches minimum). I have not received any error and the match has been removed properly. However, most of the time I do this, my user is taken out of the sports center, so the local players have not been certified anymore. It happens on iOS 7, with both the iPhone and the iPad.

Does anyone experience this? Is there a way around it?

NB: I can not even remove matches from GC, because I use internal business logic to determine which matches the user should be listed and tell, only 10 (Incomplete) Most recent, however, I am afraid that hundreds of games can be kept in GC and it can slow down the conversation with GC when I have to get a list of matches.

If you are ending a conclude call within a completion handler for another game center API call , Then maybe you are experiencing the same problem for a while. The solution I tried today included delaying the call to remove it for a few seconds, such as:

  [match performSelector: @selector (with removeWithCompletionHandler :) withObject: ^ (NSError * error) {/ * Callback Code * /} after: 3.0];   

For me, it used to work very well, but it meant that I had to reuse some things regarding displaying an active game ... so be careful that If this solution works for you Besides, it is worth noting that the delay of 3 seconds is an arbitrary value which I have picked up and has worked for me.

In my case, I was calling the ending inside the end of the Handler block for various abandonment methods at GKTurnBasedMatch.

I think there is some problem at the end of the game center, where two types of requests can not be so close without this kind of sadness in the fact that when I gradually Calling for the game center and taking action, this issue never came to me.

Edit

Here's some cool news; It seems that he has fixed the bug in iOS 8. I have created an app that shows a bug for bug-reporting purposes (originally for iOS 7). I have tested only one app running in iOS 8 and it seems that the bug has got crushed.

Finally.

IMO, you should consider adding the end-of-handler call with the removal now. / P>

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -