Having same issue. Appeared suddenly, without changing any GameKit-related code.update: It seems to be fixed running on the 12.4 simulator. Though I never seem to be matched with anyone, I'm at least not getting errors on the request.update update: not sure why I was so cavalier about not getting matched with anyone ever. Real-time matching doesn't work if my players don't get matched. Some people seem to be saying that updating to the lates iOS Simulator builds make the problem go away, but I am on Mojave, and I can't update to Catalina, so I can't get the latest iOS Simulators.
Post
Replies
Boosts
Views
Activity
Check if Game Center is enabled in the settings of the device. It wasn't, for me, and when I turned it on it worked. It seems like the setting got reset when the simulator was upgraded to the latest OS.
I've found half of a solution but I can't figure out the other half.
I use a custom ViewController as my root VC, and it has a "stashedViewController" property.
I override the present(etc) function, and inside it I check if a ViewController is already being presented.
If there's already a presentedViewController, I put the interloping ViewController into the stashedViewController property and I return without presenting it
...so this is half a solution because it is indeed keeping my app from crashing...
...but the other half is that I have to figure out what to do with this stashed controller.
It's not hard to figure out how to hand it over to the current top-level ViewController for presenting, what's hard is figuring out for sure whether or not the stashed controller is indeed a Game Center login ViewController.
I can tell during debugging that the class is actually GKHostedAuthenticateViewController, but apparently we're not supposed to be able to explicitly check for that class, so I'm a bit at a loss how to proceed.
Any ideas?