Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Objective-C Helper class to ease interaction with Apple's GameKit API (iOS8 Fixed)

License

NotificationsYou must be signed in to change notification settings

devcarlos/ABGameKitHelper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fixed for iOS7/8 Objective-C Helper class to ease interaction with Apple's GameKit API with New iOS8 delegate GKGameCenterControllerDelegate!

Should work with all types of Apps for iOS7 and iOS8 and Cocos2D 2.x and 3.x

Features:

  • iOS7/8 Fixed
  • 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", "CFNetwork.framework", "Security.framework" and "SystemConfiguration.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

    [ABGameKitHelper sharedHelper];

  4. Thats the basic setup, easy huh? Now on to actually interacting with GameCenter:

Show Leaderboard

[[ABGameKitHelper sharedHelper] showLeaderboard:@"leaderboardId"];

Show Achievements

[[ABGameKitHelper sharedHelper] showAchievements];

Report Achievement

[[ABGameKitHelper sharedHelper] reportAchievement:@"achievementId" percentComplete:100.0f];

Show Notification (Shown only once per completed Achievement)

[[ABGameKitHelper sharedHelper] showNotification:@"Notification Title" message:@"Some Message" identifier:@"achievementID"];

Report Leaderboard Score

[[ABGameKitHelper sharedHelper] reportScore:2000 forLeaderboard:@"leaderboardId"];

!If no Internet connection is present during reporting Achievemnts/Leaderboard Scores are automatically cached and reported the next time the Player authenticates


License:

MIT License, check "LICENSE"

About

Objective-C Helper class to ease interaction with Apple's GameKit API (iOS8 Fixed)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C100.0%

[8]ページ先頭

©2009-2025 Movatter.jp