I want to implement a turn timeout feature in my game center app. It should give each user a 30-60 sec time to complete their turn and if not they should be treated as they quit. I tried using the timeout
parameter of endTurnWithNextParticipants
but it doesn't seem effective with small values. It never signals a turn timeout, afais the default value for it is 1 week (GKTurnTimeoutDefault
). So I guess apple had different ideas than mine while using the name turnbasedmatch.
My best bet is to set a timer when user receives the turn for 30-60 secs, and if user does not make a turn in that period, fire one of the participant quit methods. But it is not a reliable solution because users may run out of batteries, turn off the phone also nstimer seems to pause ticking during uitouchevents (uiscrollview scrolling etc, maybe it can be handled by running nstimer in another thread i don't know). Any tips on implementing turn time out reliably?