I\'m building an iPhone game that uses Game Center and I\'m having a hard time understanding how to start a match game that was started by receiving an invitation to play from a
Despite what the Apple engineer said, how about try something like this to invite without using a custom view:
[[GKLocalPlayer localPlayer] loadFriendsWithCompletionHandler:^(NSArray *friends, NSError *error) {
[GKPlayer loadPlayersForIdentifiers:friends withCompletionHandler:^(NSArray *players, NSError *error) {
for (GKPlayer *player in players) {
NSLog(@"%@",player.alias); //here I'm just logging the aliases but the array players can be used in any way
}
}];
} ];
Now if a user selects players from this list on a custom view, GKMatchRequest has a property called playersToInvite and we can set these players to that property. And create a match programmatically using this request.
This looks very possible but I haven't tried it to be honest