- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- (void) removeGameFromGC
{
AUTO_SELF_();
[_match removeWithCompletionHandler:
^(NSError *error) {
if(!error)
{
DLog(@"match removed!");
}
else
{
[self reportError:error];
GKTurnBasedParticipant *nextParticipant = nil;
for (GKTurnBasedParticipant *participant in _match.participants)
{
participant.matchOutcome = GKTurnBasedMatchOutcomeTied;
if(![TurnBasedHelper isHeLocal:participant.playerID])
nextParticipant = participant;
}
[_match endTurnWithNextParticipants:@[nextParticipant]
turnTimeout:GKTurnTimeoutDefault
matchData:nil
completionHandler:
^(NSError *error)
{
if (error)
{
[self reportError:error];
}
[_match participantQuitOutOfTurnWithOutcome:GKTurnBasedMatchOutcomeQuit
withCompletionHandler:
^(NSError *error)
{
if (error)
{
DLog(@"%@" ,error);
}
[_match removeWithCompletionHandler:^(NSError *error)
{
if (error)
{
DLog(@"%@" ,error);
}
}];
}];
}];
}
[self_ removeMatchRequest];
}];
}
Спасибо, дорогая Apple, что оставила нам баг с удаляемыми матчами в Game Center, а то бы не получилось такой колбаски спиралью :poop:
guest8 11.07.2020 03:51 # −999