Quick Start

Get from zero to your first event in under 5 minutes

This guide walks you through creating a project, registering an app, installing the SDK, and sending your first event. By the end, you will see live data flowing into your Appflow dashboard.

1

Create a Project

Projects are the top-level container for your apps and team. Head to the Dashboard and click New Project, give it a name and timezone, and you are ready to go. You can also create a project via the API:

cURL
curl -X POST https://api-v2.appflow.ai/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My App", "timezone": "America/New_York"}'
Every project gets a unique proj_ ID and its own set of API keys. You can manage multiple apps under one project.
2

Register Your App

Create an app within your project. Each app represents a single platform (iOS or Android) and is identified by its bundle ID or package name.

cURL
curl -X POST https://api-v2.appflow.ai/v1/apps \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id": "proj_xxx", "name": "My iOS App", "platform": "ios", "bundle_id": "com.example.myapp"}'

The response includes an app_id and a client API key (ck_) that you will use in the SDK.

3

Install the SDK

Add the Appflow SDK to your mobile project. Choose your platform below.

Swift Package Manager

In Xcode, go to File → Add Package Dependencies and enter the repository URL:

Package URL
https://github.com/appflow-ai/appflow-swift-sdk
4

Initialize the SDK

Call configure once when your app launches, typically in your App Delegate or Application class. Replace the IDs with the values from your dashboard.

AppDelegate.swift
import Appflow

Appflow.configure(
    appId: "app_xxx",
    apiKey: "ak_xxx"
)
The SDK automatically captures app opens, session duration, and device metadata. No additional code needed for baseline analytics.
5

Send Your First Event

Track custom events anywhere in your app using the track method. Events accept a name and an optional dictionary of properties.

OnboardingView.swift
Appflow.track("onboarding_complete", properties: [
    "step_count": "5",
    "duration_seconds": "45"
])
6

Verify in Dashboard

Open the Measure → Events page in your dashboard. Events arrive in real-time and will appear within seconds of being sent. You should see your onboarding_complete event along with its properties.

If events do not appear after 30 seconds, double-check your app_id and apiKey values. You can also inspect outgoing requests in Settings → Debug Log to verify the SDK is sending data.