Use the following steps to integrate Game Center authentication:
Open our Xcode project if it's not already open.
Add
GameKit.framework
to the list of frameworks to be linked.Switch to
AppDelegate.m
.Import the
GameKit
header file using the following line of code:#import <GameKit/GameKit.h>
Update the
didFinishLaunchingWithOptions
method to look like the following piece of code:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { CGRect screenBounds = [UIScreen mainScreen].bounds; _window = [[UIWindow alloc] initWithFrame:screenBounds]; _viewController = [[SPViewController alloc] init]; [Ubertesters initialize]; [_viewController startWithRoot:[Game class] supportHighResolutions:YES doubleOnPad:YES]; [GKLocalPlayer localPlayer].authenticateHandler = ^(UIViewController *viewController, NSError *error) { if ([GKLocalPlayer localPlayer...