I'm trying to establish a connection between two devices using mobile network. The config in both devices are ok allowing use mobile data for the app.
I'm able to connect and start the game with WIFI networ
`// Initiate matchmaking
- (void)initiateMatchmakingWithViewController:(UIViewController*)rustViewController {
dispatch_async(dispatch_get_main_queue(), ^{
if (![GKLocalPlayer localPlayer].isAuthenticated) {
NSLog(@"Player is not authenticated.");
return;
}
NSLog(@"Preparing MatchMaker");
GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 2;
GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithMatchRequest:request];
mmvc.matchmakerDelegate = self;
// Use the passed view controller to present the matchmaking UI
[rustViewController presentViewController:mmvc animated:YES completion:nil];
NSLog(@"MatchMaker running....");
// Store the rustViewController for later, to revert back to it
originalViewController = rustViewController;
});
}
// GKMatchmakerViewControllerDelegate methods
- (void)matchmakerViewControllerWasCancelled:(GKMatchmakerViewController *)viewController {
[originalViewController dismissViewControllerAnimated:YES completion:nil];
NSLog(@"Matchmaking was cancelled.");
}
- (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFailWithError:(NSError *)error {
[originalViewController dismissViewControllerAnimated:YES completion:nil];
NSLog(@"Matchmaking failed with error: %@", error.localizedDescription);
}
- (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match {
[originalViewController dismissViewControllerAnimated:YES completion:nil];
self.currentMatch = match;
match.delegate = self;
NSLog(@"Match found.");
// Fetch details for each player in the match
NSMutableArray<NSString *> *playerIDs = [NSMutableArray array];
for (GKPlayer *player in match.players) {
[playerIDs addObject:player.playerID];
}
[GKPlayer loadPlayersForIdentifiers:playerIDs withCompletionHandler:^(NSArray<GKPlayer *> *players, NSError *error) {
if (error) {
NSLog(@"Error retrieving player details: %@", error.localizedDescription);
return;
}
for (GKPlayer *player in players) {
if (![player.playerID isEqualToString:GKLocalPlayer.localPlayer.playerID]) {
[self loadAndStoreAvatarForRemotePlayer:player];
}
}
}];
}`
I can see how both clients are in state "connecting" but the log "Match found." it's never set.
I also can see this log "[Match] syncPlayers failed to loadPlayersForLegacyIdentifiers"