SC_LocalAchievementsController

The SC_LocalAchievementsController manages achievements of the current game for the session user only.

This information is stored locally and has to be synchronized by the developer with the server.

The APIs of SC_LocalAchievementsController allow the following actions:
  • set an award as being achieved

  • synchronize local achievements with the server

  • query for achievements from the server

Note that you must configure awards for your game on . Part of the configuration process includes choosing a unique reverse DNS identifier for every award. Once awards have been configured, Scoreloop generates an awards bundle, which you must add to you game projects. This provides local access to information about the configured awards, including their identifiers and achieving values, among other things.

See also:

SC_Award.

Use Case 1: To set an award as being achieved for a user:

When the game is played, as the user completes one of the incremental stages necessary to achieve the award, set the value of the award accordingly.
  1. Get an instance of SC_LocalAchievementsController or reuse an existing one.

Use Case 2: To synchronize locally stored information with the server:

  1. Get an instance of SC_LocalAchievementsController or reuse an existing one.

  2. Call the SC_LocalAchievementsController_ShouldSynchronize() method. This will check to see if there is locally stored information on the device that should be synchronized with the server.

  3. If synchronization should occur, call SC_LocalAchievementsController_Synchronize() to update the server with the local data.

Note that the achievements can be updated to the server at any time. If a user updates achievements during an ongoing synchronization, those achievements too will be synchronized as part of current synchronization processs.

Use Case 3: To retrieve lists of Achievement objects:

  1. Get an instance of SC_LocalAchievementsController or re-use an existing one.

  2. Call SC_LocalAchievementsController_GetAchievements() to obtain achievements for the session user

Last modified: 2014-09-29



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus