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?
Topic:
Graphics & Games
SubTopic:
GameKit
Tags: