Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-gamecenter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-gamecenter

This plugin allows interaction with iOS Game Center.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

cordova-plugin-gamecenter

  • A plugin to integrate Game Center in a Cordova iOS app/game.
  • Please read Game Center Programming Guide and the iTunes Connect Developer Guide.

Install

With Cordova CLI:

cordova plugin add https://github.com/Wizcorp/cordova-plugin-gamecenter

Sample Code

Authentication

gameCenter.authenticate(Function success, Function failure);

Showing the leaderboard

gameCenter.showLeaderboard(String category, Function success, Function failure);

Showing the Achievements board

gameCenter.showAchievements(Function success, Function failure);

Getting view show/hide events

window.gameCenter.onshow = function() { console.log("onshow!" )}

window.gameCenter.onhide = function() { console.log("onhide!" )}

Report a score

gameCenter.reportScore(String category, int score, Function success, Function failure);

Report an achievement

gameCenter.reportAchievement(String category, Function success, Function failure);

** For a working example see the project in platforms/ios/ folder (remember to change your bundleId). **

FAQ

I don't see my Leaderboard / Achievements in the popup!

Check you have configured your bundle id corectly.

Keywords

FAQs

Package last updated on 14 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc