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

> Complete guide to integrate Gameball with your iOS application using SDK v3.1.1

# Gameball iOS SDK - v3.1.1

This documentation is tailored to **Gameball iOS SDK v3.1.1**. Use these pages as a versioned SDK reference for teams embedding Gameball into their iOS applications.

<Info>
  SDK v3.1.1 adds Session Token authentication for enhanced security and automatic v4.1 endpoint routing. All v3.0.0 functionality remains fully compatible.
</Info>

***

## 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.
* 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 12+** with **Swift 5.0+**.
* Swift Package Manager configured.
* Chosen between **sandbox** or **production** mode for testing.
* A **unique Player ID** ready to identify your app users.

***

## Integration Guide

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/installation-guides/v3/ios/getting-started">
    Install the Gameball iOS SDK v3.1.1 and set up your project
  </Card>

  <Card title="Initialize SDK" icon="play" href="/installation-guides/v3/ios/initialize-sdk">
    Initialize the SDK with your API key and configuration
  </Card>

  <Card title="Initialize Customer Profile" icon="user" href="/installation-guides/v3/ios/initialize-profile">
    Register and identify customers within your iOS app
  </Card>

  <Card title="Track Customer Events" icon="chart-line" href="/installation-guides/v3/ios/track-events">
    Send customer events to power campaigns and rewards
  </Card>

  <Card title="Show Profile Widget" icon="window" href="/installation-guides/v3/ios/show-profile">
    Display the customer profile widget with rewards and leaderboard
  </Card>

  <Card title="Push Notifications" icon="bell" href="/installation-guides/v3/ios/push-notifications">
    Register Firebase or Huawei push tokens for Gameball notifications
  </Card>

  <Card title="Go-Live Checklist" icon="check" href="/installation-guides/v3/ios/go-live-checklist">
    Verify your integration before going live
  </Card>

  <Card title="Migration Notes" icon="arrow-right" href="/installation-guides/v3/ios/migration-notes">
    Migrate from v2 to v3.1.1
  </Card>
</CardGroup>

***

## Authentication Notes

Starting from SDK v3.1.1, 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://developer.gameball.co/rest-api/integrations/customers).
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.
</Note>

***
