ios - endturnwithnextparticipants, how does it work? -


i making turnbased game ios game center, 2 participants per match. implement time limit on every turn, player don't have wait forever other player finish turn. have tried:

currentmatch endturnwithnextparticipants:[[nsarray alloc] initwithobjects:nextparticipant,nil] turntimeout:gkturntimeoutdefault matchdata:data completionhandler:^(nserror *error)  

but nothing happens, player still has forever turn, missing here.

what happens when time limit reached? how gamecenter handle this, , should handle this?

that method updates data stored on game center current match.

according apple docs:

if next player act not take turn in specified interval, next player in array receives notification act. process continues until player takes turn or last player in list notified. when method called, creates new background task handle request. method returns control game. later, when task complete, game kit calls completion handler. keep in mind completion handler may called on thread other 1 used invoke method. means code in block needs thread-safe.

i think need end players go on end programatically.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -