Show Gameball User Profile

Show your user's profile including all details, user challenges, and the leaderboard on your iOS app.

Gameball’s views are accessible through the code below. You just need to use it on any button action.

//Change the APIKEY , Language , player ID based on your references
  gameball.launchGameball(withAPIKEY: <YOUR_API_KEY>, withPlayerUniqueId: <YOUR_PLAYER_ID>, withLang: lang) { (GBVC, error) in
   guard let gameBallVC = GBVC else {return}
     self.present(gameBallVC, animated: true, completion: nil)
   }

Once the APIKey and playerUniqueId have been registered, Gameball views can be made visible to the user

The below is description of Initialization params

Parameters

Required

Description

Type

APIKey

Required

Your Gameball unique client API Key

How to get your Gameball account API Key

String

lang

Optional

Your platform language preference to view Gameball Widget with. If not provided, Gameball app will appear in English.

String:

ar

de

en

es

fr

pl

pt

playerUniqueId

Required

PlayerUniqueId is a unique ID for you user, for example UUID or username. The PlayerUniqueId is to be provided by the client and must be unique for each user.

String

Choose an Unchangeable Player Unique ID

Gameball user profile gets created using the playerUniqueId. It is highly recommended to have the unique ID as an identifier that would NEVER be changed. If this unique ID changes for a given player, you risk losing all original data for that player and hence losing their points and rewards on Gameball. Accordingly, it is NOT recommended to use email address or mobile number as the unique ID as both can be changed by the user at anytime.

Last updated