I am adding Game Center features (leaderboard) to my game. Since Game Center is not a requirement for my game, I check if it is available and then use it or not.
To check if Game Center is available, instead of making direct access to GK classes (like GKLocalPlayer), NSClassFromString is used.
My question is, after determining that Game Center is supported, in the code that will be executed only if Game Center is there (although the code will be there if Game Center is not) is there any way to use those classes directly, without using NSClassFromString for all GameKit classes I use? Currently I am doing it, and the game crashes if Game Center is not available.
Thanks in advance