I have an iOS app for which I want to use the Game Center API for saving games. At the same time, I want to have the option to save multiple games on the local file system, using the familiar save-slots mechanism. I anticipate that a user may not wish to use the Game Center, or may wish to support a guest user on their device.
I initiate authentication and loading asynchronously, as recommended by Apple, which in itself causes issues as the callbacks may arrive before or after the ViewControllers which are interested in them are loaded.
Typically, the app starts before the authentication is complete, which means the offline games are available first and the game center games become available at a later point. However, if the user is using the Game Center, it is likely that these later arriving games are the ones that would be interesting.
I am wondering how to handle these two sets of save-games. My first thought was to allow the user to explicitly switch between Game Center mode and local mode, but Apple explicitly says that you should not do this. I also want to avoid blocking waiting for the authentication to complete. I have to admit that, since I am still in development, I lack the ability to try out various strategies easily.
Are there any good patterns for managing both online and offline saves in an iOS app?