O'Reilly logo

Sparrow iOS Game Framework Beginner's Guide by Johannes Stein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – integrating Game Center authentication

Use the following steps to integrate Game Center authentication:

  1. Open our Xcode project if it's not already open.
  2. Add GameKit.framework to the list of frameworks to be linked.
  3. Switch to AppDelegate.m.
  4. Import the GameKit header file using the following line of code:
    #import <GameKit/GameKit.h>
  5. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required