> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pushnotif.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From zero to tracked events and delivery telemetry in about 30 minutes.

You need an iOS app on iOS 16 or later, Xcode 16 or later, access to your Apple
Developer account, and a PushNotifAI workspace. Workspaces are invite-only
for now: if you don't have one, contact us.

**1. Create an app and copy its ingest key**

Sign in at [app.pushnotif.ai](https://app.pushnotif.ai). In workspace
settings, create an app. Production and staging are separate apps, so
create one per environment.

Creating an app issues its first **ingest key** (`pna_...`). It is shown
exactly once, so copy it now. You can issue more later on the app's
**SDK Keys** page.

> [!NOTE]
>
> The ingest key can only *write* events. It cannot read anything, so it is
> safe to ship inside your app binary.

**2. Upload your APNs key**

In workspace settings, upload your APNs auth key (`.p8`) with its Key ID
and your Team ID. See [APNs key](https://docs.pushnotif.ai/dashboard/apns-key.md) for where to find
them in the Apple Developer portal.

**3. Add the SDK**

In Xcode, add the Swift package and link the `PushNotifAI` product to your
app target:

```swift theme={null}
.package(
    url: "https://github.com/vdsingh/pushnotifai-swift-sdk",
    exact: "0.3.0"
),
```

**4. Configure, identify and track**

Configure the SDK as early as possible, in your app delegate's
`didFinishLaunching` or your `App` initializer:

```swift theme={null}
import PushNotifAI

Push.configure(PushConfiguration(
    apiKey: "pna_...",
    baseURL: URL(string: "https://api.pushnotif.ai")!
))
```

When you know who the user is, identify them with your own user id. Then
track the events that matter to your product:

```swift theme={null}
Push.identify(user.id)
Push.track("lesson_completed", properties: ["lesson_id": lesson.id])
```

Token registration and tap and dismiss reporting happen automatically. You
still decide when to ask the user for notification permission.

**5. Add the Notification Service Extension**

This is what reports real delivery. Add a Notification Service Extension
target, make its class subclass ours, and share this app group between the
app and the extension:

```
group.<your-app-bundle-id>.pushnotifai
```

```swift theme={null}
import PushNotifAINSE

final class NotificationService: PushNotifAIServiceExtension {}
```

Full steps: [Delivery telemetry](https://docs.pushnotif.ai/sdk/delivery-telemetry.md).

**6. Check it worked**

Run the app and open the dashboard. Your events show up on the **Events**
page, and the device and user on **Users**. Nothing is sent yet: no flow
is active until you activate one.

## Next

> [card] [Write your first flow](https://docs.pushnotif.ai/strategy/flows.md)

> [card] [Let the Composer propose flows](https://docs.pushnotif.ai/strategy/composer.md)


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