Invalid certificate error when requesting GameKit matchmaking room on certain iOS devices

We're implementing multiplayer using GameKit's realtime match functionality and are seeing a certificate error on certain iOS devices when attempting to call GKMatchRequest.

The request fails with the exception: "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “init.gc.apple.com” which could put your confidential information at risk."

This only appears to affect a small number of iOS devices, namely:

  • iPad 6 on iOS 14.8
  • iPad Mini 6th gen
  • iPad Mini 5th gen

Other iOS devices and other platforms match without issues. We've tried multiple different wifi networks on these devices (including cellular hotspot) to try to rule out local network issues. Has anyone run into this?

This looks like a problem verifying the SSL cert when accessing an https end point on init.gc.apple.com. Since your other devices don't have a problem, the SSL cert offered by the server would seem to be good. Also, since I assume the working devices are using the same internet access point, it is unlikely to be a problem with a proxy in the path to the service. Is it possible the root CA certs on these specific devices has somehow been corrupted or modified? Try re-installing the OS.

Invalid certificate error when requesting GameKit matchmaking room on certain iOS devices
 
 
Q