> ## 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.

# iOS SDK Integration (v4)

> Complete guide to integrate Gameball with your iOS application using SDK v4.0.0

# 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.

> [!NOTE]
>
> 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

> [card] [Getting Started](https://docs.gameball.co/installation-guides/v4/ios/getting-started.md)
>
> Install the Gameball iOS SDK v4.0.0 and set up your project

> [card] [Initialize SDK](https://docs.gameball.co/installation-guides/v4/ios/initialize-sdk.md)
>
> Initialize the SDK with your API key and configuration

> [card] [Initialize Customer Profile](https://docs.gameball.co/installation-guides/v4/ios/initialize-profile.md)
>
> Register and identify customers within your iOS app

> [card] [Track Customer Events](https://docs.gameball.co/installation-guides/v4/ios/track-events.md)
>
> Send customer events to power campaigns and rewards

> [card] [Show Profile Widget](https://docs.gameball.co/installation-guides/v4/ios/show-profile.md)
>
> Display the customer profile widget with rewards and leaderboard

> [card] [Push Notifications](https://docs.gameball.co/installation-guides/v4/ios/push-notifications.md)
>
> Register Firebase or Huawei push tokens for Gameball notifications

> [card] [In-App Messaging](https://docs.gameball.co/installation-guides/v4/ios/in-app-messaging.md)
>
> Display dashboard in-app campaigns in your app

> [card] [Go-Live Checklist](https://docs.gameball.co/installation-guides/v4/ios/go-live-checklist.md)
>
> Verify your integration before going live

> [card] [Migration Notes](https://docs.gameball.co/installation-guides/v4/ios/migration-notes.md)
>
> Upgrade from v3 to v4.0.0, or migrate from v2

***

## Authentication Notes

Gameball uses **Session Tokens** to securely authenticate requests between your app and Gameball APIs.

To implement:

1. Retrieve a session token from your backend using the [Create/Update Customer API](https://docs.gameball.co/api-reference/customers/management/create-customer.md).
2. Pass this token when initializing the SDK.
3. The SDK will automatically handle secure API routing to v4.1 endpoints.

> [!NOTE]
>
> This ensures a secure, tokenized connection between your app and Gameball, preventing direct exposure of your API key.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.