Game Development Reference
In-Depth Information
Listing 14-1 . Adding the GameKit Header to Your Project's Prefix Header
#ifdef __OBJC__
#import < Foundation/Foundation.h>
#import < UIKit/UIKit.h>
#import < GameKit/GameKit.h>
#endif
That's it—your app is set up for use with 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. (Also
note that you'll likely continue to edit and add leaderboards and
achievements throughout the development of your game.)
3.
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.
4.
Add the necessary Game Kit references:
a. If needed, add the GameKit.framework to your application
target's Linked Binary with Libraries build phase. Change its Type
setting from Required to Optional if Game Kit isn't strictly re-
quired by your app.
 
Search Nedrilad ::




Custom Search