Very simple gamecenter code needed

Very simple gamecenter code needed
0.0 0


Hello there!

I want to integrate gamecenter with my app. I only want these functions in:
~~log in the user,
~~submit a score,
-show leaderboard.

I’m searching for a solution for hours now, but I haven’t found any code that I could make work, I just got confused. All of the sample codes consists tons of code, and I just figure out what part should I use, I’m quite a beginner in Objective C.

Since I’m using easyNDK (call native cocos2d functions from cocos2d-x) I only need a very simple native code, what is able to do these things, and a short guide where to put them (I suppose it should be in

I was following this guide [[]], so I’m able to log in to GC, but it does not cover the leaderboard part.

So please someone provide me a really short and straigthforward guide for this, I’d really appreciate it.



Can anyone help me please.


OK I finally found a very easy solution.


NOTE: download the files from the github link [[]], don’t care about anything else on the stackoverflow page.

~~add GameKit framework to your app
~~drag the files in to your ios folder (or wherever you want)
~~enable gamecenter and create a leaderboard on iTunes connect
~~replace the secret key in ABGameKitHelper.h
~~use the ; code in didFinishLaunchingWithOptions
~~the functions are in the readme file in the downloaded packege (from github)

To call these functions from cocos2d-x, integrate EasyNDK with your app. [[]]

I hope it helps other people with the same problem.


thanks for the codes for: Alexander Blunck, aajiwani (whoever he is)