ABGameKitHelper
===============
Objective-C Helper class to ease interaction with Apple's GameKit API
Should work with all types of Apps, also Cocos2d 2+
Features:
--
- Show Leaderboards (specify which) / Achievements
- Report Scores to Leaderboards / Report Achievements
- Achievement / Score Caching System
- All saved data is encrypted (AppStore Safe) … no cheating here ;)
____
ARC:
--
ABGameKitHelper uses ARC, to use it in a non ARC project be sure to add "-fobjc-arc" flag in "Compile Sources" configuration:
Targets->Build Phases->Compile Sources->ABGameKitHelper.m
___
Tutorial:
--
Getting ABGameKitHelper up and running is fairly easy, here a step by step guide to get you started:
1. Link "GameKit.framework" with your Project
2. In ABGameKitHelper.h edit SECRET_KEY to your liking
3. Call following code once the UI of your application is loaded
<code>[ABGameKitHelper sharedHelper];</code>
3. Thats the basic setup, easy huh? Now on to actually interacting with GameCenter:
<strong>Show Leaderboard</strong>
<code>[[ABGameKitHelper sharedHelper] showLeaderboard:@"leaderboardId"];</code>
<strong>Show Achievements</strong>
<code>[[ABGameKitHelper sharedHelper] showAchievements];</code>
<strong>Report Achievement</strong>
<code>[[ABGameKitHelper sharedHelper] reportAchievement:@"achievementId" percentComplete:100.0f];</code>
<strong>Show Notification</strong> (Shown only once per completed Achievement)
<code>[[ABGameKitHelper sharedHelper] showNotification:@"Notification Title" message:@"Some Message" identifier:@"achievementID"];</code>
<strong>Report Leaderboard Score</strong>
<code>
[[ABGameKitHelper sharedHelper] reportScore:2000 forLeaderboard:@"leaderboardId"];
</code>
<strong>!</strong>
If no Internet connection is present during reporting Achievemnts/Leaderboard Scores are automatically cached and reported the next time the Player authenticates
____
Future:
--
- Mac / Moutain Lion Compatibility
____
License:
--
MIT License, check "LICENSE"
没有合适的资源?快使用搜索试试~ 我知道了~
关于Gamecenter的一个很好用的类GameKitHelper包括数据本地存储
共17个文件
m:4个
h:3个
png:3个
5星 · 超过95%的资源 需积分: 13 74 下载量 161 浏览量
2013-09-25
10:07:17
上传
评论 2
收藏 23KB ZIP 举报
温馨提示
在做项目时候,碰到的一个很好用的类,直接解决了困扰很久的问题,分享出来大家一起学习,希望从中受益,对Ios的gamecenter真的是相当完美的!
资源推荐
资源详情
资源评论
收起资源包目录
ABGameKitHelper-master.zip (17个子文件)
ABGameKitHelper-master
ABGameKitHelper
ABGameKitHelper.h 2KB
ABGameKitHelper.m 15KB
LICENSE 1KB
ABGameKitHelper-Example
ABGameKitHelper-Example.xcodeproj
project.pbxproj 14KB
ABGameKitHelper-Example
main.m 361B
Default.png 6KB
ABGameKitHelper-Example-Info.plist 1KB
ABGameKitHelper-Example-Prefix.pch 349B
AppDelegate.h 302B
AppDelegate.m 2KB
Default-568h@2x.png 18KB
Default@2x.png 16KB
ViewController.h 240B
ViewController.m 561B
en.lproj
InfoPlist.strings 45B
.gitignore 204B
README.md 2KB
共 17 条
- 1
shangxinlei88
- 粉丝: 11
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页