API Index
Overview
Setup
Initialize
Achievements
Challenges
Leaderboards
Scores
Players
Real-Time Game
Turn-Based Game
Before you add this plugin to your Corona SDK iOS game, you need to Activate it on the Corona Plugin Directory and setup Game Center on Apple iTunes Connect.
Then add the following entries into the plugins table and the iphone plist table of your build.settings file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
settings = { plugins = { ["plugin.gamekit"] = { publisherId = "com.animonger", supportedPlatforms = { iphone=true, }, }, }, iphone = { plist = { MinimumOSVersion = "7.0", }, }, } |
After you add the plugin to your build.settings file, require the plugin within your game code.
1 2 3 4 5 6 7 |
gameKit = require("plugin.gamekit") -- the code examples in this documentation show assignment to global variables for simplicity. a better practice for your game is to use table properties -- for example local composer = require('composer') composer.gameKit = require("plugin.gamekit") |