Wednesday, May 9, 2012

How to support Game Center

Game Center Setup Summary 
To summarize, enabling Game Center for your app requires the following steps:
1. Create a new app in iTunes Connect:
  a. Specify a Bundle ID for the new app.
  b. Enable Game Center for this app.
2. Set up your initial leaderboards and achievements in iTunes Connect:
  a. Note the leaderboard category IDs and achievement IDs. (Note that you will likely continue to edit    and add leaderboards and achievements throughout the development of your game.)
3. Create or upgrade the Xcode project:
  a. Make sure to use at least cocos2d v0.99.5.
4. Edit Info.plist:
  a. Enter the app’s Bundle ID in the Bundle identifier field.
  b. Optionally require Game Kit by adding a Boolean value labeled gamekit to the UIRequiredDeviceCapabilities list.
5. Add the necessary Game Kit references:
  a. Add the GameKit.framework linked library to each target. Change its Type setting from Required to Weak if Game Kit support is optional.
  b. Add #import to your project’s prefix header file. 
Before you proceed, make sure you have followed each step. You can always go back and make the necessary changes later. However, if you don’t do all of these steps at the beginning, chances are that you will get errors or something won’t work, but the associated error message won’t necessarily point you to a mistake or oversight concerning one of these steps. Common causes for Game Center to not work properly are a mismatch between the Bundle ID in the project’s Info.plist file and the Bundle ID set up for your app in iTunes Connect.

No comments:

Post a Comment