Official Website | Opportunities | Mobile Academy
Capacitor plugin for connecting and using services by Apple Game Center. Features included are access to Sign-In, Leaderboard, and Achievements.
If you need both Apple Game Center and Google Play Game Services, check out our other Capacitor plugin that contains both!
Capacitor Version | Support Status |
---|---|
Capacitor v5 | 🚧 |
Capacitor v4 | ✅ |
Capacitor v3 | ✅ |
Capacitor v2 | ❌ |
Capacitor v1 | ❌ |
✅ - Supported 🚧 - WIP Support ❌ - No plans to support
The lovely folks at OpenForge! Feel free to tag any of the following:
Maintainer | Github |
---|---|
Ricardo | @Ricardo385 |
Paulina | @paulpauldevelops |
Jedi | @jedihacks |
Checkout these existing Ionic/Angular/Capacitor mobile game with the plugin installed and integrated:
npm install @openforge/capacitor-apple-game-center
npx cap sync
- Click on Target App in xcode
- Add team to Signing and Capabilities
- Add Game Center Capability
- Go to your Apps in https://appstoreconnect.apple.com/ and add your application
- Scroll down in your App Store tab from your application view and check the Game Center field
- Go to Services tab and configure both Leaderboards and Achievements
- Go back to App Store tab and select you Leaderboards and Achievements configurations
signIn()
showLeaderboard(...)
submitScore(...)
showAchievements()
unlockAchievement(...)
incrementAchievementProgress(...)
signIn() => Promise<void>
- Method to sign-in a user
showLeaderboard(options: { leaderboardID: string; }) => Promise<void>
- Method to display the Leaderboards
Param | Type |
---|---|
options |
{ leaderboardID: string; } |
submitScore(options: { leaderboardID: string; totalScoreAmount: number; }) => Promise<void>
- Method to submit a score to the Google Play Services SDK
Param | Type |
---|---|
options |
{ leaderboardID: string; totalScoreAmount: number; } |
showAchievements() => Promise<void>
- Method to display the Achievements view
unlockAchievement(options: { achievementID: string; }) => Promise<void>
- Method to unlock an achievement
Param | Type |
---|---|
options |
{ achievementID: string; } |
incrementAchievementProgress(options: { achievementID: string; pointsToIncrement: number; }) => Promise<void>
- Method to increment the progress of an achievement
Param | Type |
---|---|
options |
{ achievementID: string; pointsToIncrement: number; } |