Getting Started
Install the Gameball React Native SDK into your app
The Gameball Android and iOS package, enables you to use the show Gameball customer profile in your app, track app customer events, integrate referrals and display Gameball's in-app push notifications.
Installation
Follow the below steps to start installing react native SDK package to your app
Install package using npm
Install prerequisite packages using npm
react-native-modal and react-native-push-notification-popup packages are required to use gameball package.
Fetch API is used for network communications, conversion of response to json is needed in order to read the response res => res.json()
Initialization
In order to use Gameball SDK, apply the below step to the main JS file (index or app).
Import Gameball Widget
Initialize Gameball Widget
Register Customer
Register player method is used to create or update customers at Gameball. It is called when your login network call is successful.
First, import Gameball SDK as follows:
then
Once the APIKey and playerUniqueId have been registered, Gameball views can be made visible to the user.
Choose an Unchangeable Player Unique ID
Gameball customer gets created using theplayerUniqueId
. 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 customer, you risk losing all original data for that customer, 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 customer at anytime.
Last updated