How to get GKMatch instance after accepting GKInvite?

In my SceneKit game I'm able to connect two players with GKMatchmakerViewController. Now I want to support the scenario where one of them disconnects and wants to reconnect. I tried to do this with this code:

nonisolated public func match(_ match: GKMatch, player: GKPlayer, didChange state: GKPlayerConnectionState) {
    Task { @MainActor in
        switch state {
        case .connected:
            break
        case .disconnected, .unknown:
            let matchRequest = GKMatchRequest()
            matchRequest.recipients = [player]
            do {
                try await GKMatchmaker.shared().addPlayers(to: match, matchRequest: matchRequest)
            } catch {
            }
        @unknown default:
            break
        }
    }
}

nonisolated public func player(_ player: GKPlayer, didAccept invite: GKInvite) {
    guard let viewController = GKMatchmakerViewController(invite: invite) else {
        return
    }
    viewController.matchmakerDelegate = self
    present(viewController)
}

But after presenting the view controller with GKMatchmakerViewController(invite:), nothing else happens. I would expect matchmakerViewController(_:didFind:) to be called, or how would I get an instance of GKMatch?

Here is the code I use to reproduce the issue, and below the reproduction steps.

  1. Run the attached project on an iPad and a Mac simultaneously.
  2. On both devices, tap the ship to connect to GameCenter.
  3. Create an automatched match by tapping the rightmost icon on both devices.
  4. When the two devices are matched, on iPad close the dialog and tap on the ship to disconnect from GameCenter.
  5. Wait some time until the Mac detects the disconnect and automatically sends an invitation to join again.
  6. When the notification arrives on the iPad, tap it, then tap the ship to connect to GameCenter again. The iPad receives the call player(_:didAccept:), but nothing else, so there’s no way to get a GKMatch instance again.

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

Thanks. I already created FB15864883 two days ago, but I thought that I must be missing something since it would be unlikely that the invite API would have been around for years without a proper way to set up a game with it.

How to get GKMatch instance after accepting GKInvite?
 
 
Q