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

# Push Notifications

> Integrate Gameball push notifications to keep your customers informed about updates and rewards

Gameball uses Firebase to deliver maximum experience in your app. This includes push notifications and referrals support.

## Configure Gameball with Your Firebase

Before you start, you must configure your Firebase on your Gameball account. Follow the steps in [Configure your Firebase account on Gameball for mobile push notifications](https://help.gameball.co/en/articles/3522353-configure-your-firebase-account-on-gameball-for-mobile-push-notifications) article from our Help Center related to push notifications.

## Handling Push Notifications Integration

Configure notifications as usual and add two more methods using our SDK. This is normal integration for general firebase notifications configuration, so here is a how-to guide.

### 1. Add to AppDelegate Class

```swift theme={null}
// Inherit protocols
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, MessagingDelegate {
    var gameballApp: Gameball?
    // ...
}
```

### 2. Configure in didFinishLaunchingWithOptions

Put these lines in **didFinishLaunchingWithOptions()** in **AppDelegate**:

```swift theme={null}
FirebaseApp.configure()
registerForPushNotifications()
```

### 3. Add Registration Methods to AppDelegate

Add these stack of lines to the **AppDelegate** class:

```swift theme={null}
func registerForPushNotifications() {
    UNUserNotificationCenter.current()
        .requestAuthorization(options: [.alert, .sound, .badge]) {
            [weak self] granted, error in
            UNUserNotificationCenter.current().delegate = self
            Messaging.messaging().delegate = self
            guard granted else { return }
            self?.getNotificationSettings()
    }
}

func getNotificationSettings() {
    UNUserNotificationCenter.current().getNotificationSettings { settings in
        guard settings.authorizationStatus == .authorized else { return }
        DispatchQueue.main.async {
            UIApplication.shared.registerForRemoteNotifications()
        }
    }
}
```

### 4. Register Token to Gameball

Here we need to add this method to register token to Gameball. Follow this guide on [how to access the registration token](https://firebase.google.com/docs/cloud-messaging/ios/client#access_the_registration_token) and pass it to the **`gameballApp.registerDevice`**.

## Next Steps

* [Track Referrals](/installation-guides/v2/ios/track-referrals)
* [Go-Live Checklist](/installation-guides/v2/ios/go-live-checklist)
