Skip to content

Objective-c GameCenter manager utility. Fully manages GameCenter synchronization, supports multiplayer structure. Manages local score when GameCenter is not available.

License

Notifications You must be signed in to change notification settings

klusinyan/CommonUtilsGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommonUtilsGame

[![CI Status](http://img.shields.io/travis/Karen Lusinyan/CommonUtilsGame.svg?style=flat)](https://travis-ci.org/Karen Lusinyan/CommonUtilsGame) Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Step 1

Put this in your AppDelegate.m

// If you already setup leaderboard in iTunesConnect -> pass the leaderboard's identifier

static NSString * LeaderboardIdentifier = @"My-Leaderboard";

[CommonGameCenter createLeaderboardIfNotExists:LeaderboardIdentifier attributes:nil];

// ... setup more leaderboars

[CommonGameCenter startAuthenticationWithCompletion:^(BOOL authenticated, NSError *error) {
    // game center started either offline or online
}];

Step 2

#import CommonGameCenter.h 

Step 3

// Obtain score from leaderboard (returns GKScore)
[CommonGameCenter obtainScoreForLeaderboard:@"My-Leaderboard"]

// Report score to leaderboard
[CommonGameCenter reportScore:100 forLeaderboard:@"My-Leaderboard"];

Step 4

That's it! 
Enjoy

New features

Comming soon :-)

Requirements

Requires iOS 7 and later
Written in ARC

Installation

CommonUtilsGame is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "CommonUtilsGame"

Author

Karen Lusinyan, [email protected]

License

CommonUtilsGame is available under the MIT license. See the LICENSE file for more info.

About

Objective-c GameCenter manager utility. Fully manages GameCenter synchronization, supports multiplayer structure. Manages local score when GameCenter is not available.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published