Gameball iOS SDK - v3.1.0
This documentation is tailored to Gameball iOS SDK v3.1.0. Use these pages as a versioned SDK reference for teams embedding Gameball into their iOS applications.SDK v3.1.0 adds Session Token authentication for enhanced security and automatic v4.1 endpoint routing. All v3.0.0 functionality remains fully compatible.
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, purchases, and engagement to trigger rewards or cashback.
- Display in-app widgets showing points, badges, and leaderboards.
- Enable redemptions, 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 13+ with Swift 5.7+.
- Installed CocoaPods 1.11+ or configured Swift Package Manager.
- 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 v3.1.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
Set up APNs push notifications for customer engagement
Go-Live Checklist
Verify your integration before going live
Migration Notes
Migrate from v2 to v3.1.0
Authentication Notes
Starting from SDK v3.1.0, 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.