CommonUtilsGame 1.0.2

CommonUtilsGame 1.0.2

测试测试
语言版本语言 Obj-Cobjective-C
许可证 MIT
发布日期最新版本发布日期2015年6月

Karen Lusinyan维护。



  • 作者:
  • Karen Lusinyan

CommonUtilsGame

CI Status Version License Platform

用法

要运行示例项目,请克隆存储库,然后首先从 Example 目录运行 pod install 命令。

步骤 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
}];

步骤 2

#import CommonGameCenter.h 

步骤 3

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

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

步骤 4

That's it! 
Enjoy

新功能

Comming soon :-)

需求

Requires iOS 7 and later
Written in ARC

安装

CommonUtilsGame 可以通过 CocoaPods 安装。要安装它,只需将以下行添加到您的 Podfile。

pod "CommonUtilsGame"

作者

Karen Lusinyan, [email protected]

许可证

CommonUtilsGame 在 MIT 许可证下可用。更多详情请参阅 LICENSE 文件。