Showing the Gameball widget on your mobile application is slightly different than showing it on the website. You have two options; first, if you want to design your customer interface, you will use our set of REST APIs. To know more information, you can use the Configurations API 👑. The other option as this section elaborates, is through using our iOS SDK. Using the SDK, you can open the Gameball customer profile from a button in your app, programmatically when someone does something, or from a persistent button that sits over your app’s UI. When you trigger the Gameball customer profile, your customer is presented with a home screen. This is configurable inside Gameball to change how it looks and what’s presented. From there, your customer can check his progress across different Gameball programs as per your configurations. Gameball views are accessible through the code below. You just need to use it on any button action.Documentation Index
Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
Use this file to discover all available pages before exploring further.
Register Customer
The Register Player method is used to create or update customer accounts at Gameball. This API call should be made when the customer successfully logs in or whenever there are updates to the customer’s account information.Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.
The Firebase Cloud Messaging (FCM) token associated with the customer’s mobile device. Required for enabling push notifications to be sent to the customer.
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.
Completion block that gets called when the initialization of the SDK is completed
registerPlayer is called after the completion block of the SDK initalization.
Show the Widget
To show the Gameball customer profile that contains the customer details, customer reward campaigns, and the leaderboard use the showProfile SDK function.showProfile function to show the widget. The completion block tells you that the viewController is ready and you can present it the way you want, for example by default if you don’t explicitly specify modalPresentationStyle, it’ll appear as modal. If you want it full screen, you can specify it like the above example.
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.
Specify if you want the widget to open on a specific view. See available values
Set to true to stop widget navigation otherwise leave as null
You may also check the sample project here to view full implementation.