Gameball iOS SDK - v4.0.0
This documentation is tailored to Gameball iOS SDK v4.0.0. Use these pages as a versioned SDK reference for teams embedding Gameball into their iOS applications.SDK v4.0.0 adds in-app messaging and purchase logging, and raises the minimum iOS version to 15.0. Every v3.x call keeps its signature and behavior.
What You Can Do with the iOS SDK
The Gameball iOS SDK enables you to:- Connect your mobile app to the Gameball loyalty and rewards platform.
- Track customer actions to trigger rewards and campaigns.
- Display in-app widgets showing points, badges, and leaderboards.
- Show in-app messages from campaigns you author in the Gameball dashboard.
- Enable referrals and push notifications natively.
- Integrate Gameball programs without heavy backend development.
Quick Start Checklist
Before you begin, make sure you have:- A Gameball Project Key from your Gameball Dashboard → Settings → API Keys.
- An app running iOS 15+ with Swift 5.7+.
- Swift Package Manager configured.
- Chosen between sandbox or production mode for testing.
- A unique Player ID ready to identify your app users.
Integration Guide
Getting Started
Install the Gameball iOS SDK v4.0.0 and set up your project
Initialize SDK
Initialize the SDK with your API key and configuration
Initialize Customer Profile
Register and identify customers within your iOS app
Track Customer Events
Send customer events to power campaigns and rewards
Show Profile Widget
Display the customer profile widget with rewards and leaderboard
Push Notifications
Register Firebase or Huawei push tokens for Gameball notifications
In-App Messaging
Display dashboard in-app campaigns in your app
Go-Live Checklist
Verify your integration before going live
Migration Notes
Upgrade from v3 to v4.0.0, or migrate from v2
Authentication Notes
Starting from SDK v3.1.1, Gameball uses Session Tokens to securely authenticate requests between your app and Gameball APIs. To implement:- Retrieve a session token from your backend using the Create/Update Customer API.
- Pass this token when initializing the SDK.
- The SDK will automatically handle secure API routing to v4.1 endpoints.
This ensures a secure, tokenized connection between your app and Gameball, preventing direct exposure of your API key.