Skip to content
moadib edited this page Aug 23, 2012 · 4 revisions

About Scoreloop SDK versions

We use upSL with:

  • Scoreloop 4.3 for iOS
  • Scoreloop 1.0 for BlackBerry (included in blackberry native sdk 2.0)
  • Scoreloop 3.0.2 for Android

Initialize and shutdown

You should add:

  • Scoreloop::Client::Initialize(TOSAccepted); in Application::applicationDidFinishLaunching(). Where TOSAccepted is a callback which called when user accept TOS or immediatly after initialisation if he did it early

  • Scoreloop::Client::Shutdown(); in Application::~Application()

!NOTICE! You can use Scoreloop functions only if receive TOSAccepted callback.

Platform specific part

iOS

Substitute value of "game id" and "secret key" in ScoreloopManager.mm

#define SL_GAME_ID "YOUR GAME ID"
#define SL_SECRET_KEY "YOUR GAME SECRET KEY"

Don't forget to add -ObjC flag in "Other Linker flags"

Android

Add in onCreate() method of Application class

Scoreloop.init(this, "YOUR GAME SECRET KEY");
Add in onCreate(Bundle savedInstanceState) method of Activity class
Scoreloop.setActivity(this);
Scoreloop.setGLSurfaceView(mGLView);

Blackberry

You should have

if (Scoreloop::HandleBSPEvent(event))
return true;

in your event handler, see void CCEGLView::setEventHandler(EventHandler* pHandler) which introduced in cocos2d-x with our pull request

Don't forget to substitute value of "game id" and "secret key" in qnx_scoreloop.cpp

#define SL_GAME_ID "YOUR GAME ID"
#define SL_SECRET_KEY "YOUR GAME SECRET KEY"

To use it with Blackberry 10 SDK you must add BB10 to preprocessor definitions since Scoreloop have differences in versions for Playbook and Blackberry10.