·7 min read

iOS Onboarding Analytics: Track User Onboarding in Swift

Native iOS apps have specific patterns for onboarding - permission prompts, App Tracking Transparency, Sign in with Apple. Here's how to instrument your flow and see where users drop off.

iOS-specific onboarding challenges

Native iOS onboarding has a few patterns that affect analytics:

App Tracking Transparency (ATT) - iOS 14.5+ requires explicit permission for cross-app tracking. If you're using any tracking framework that touches IDFA, ATT prompts add friction. The OnRamp SDK doesn't use IDFA and doesn't trigger ATT prompts.

Permission prompt timing - Push notifications, camera, contacts, and location all require separate system prompts. When and how you ask for these significantly affects both the permission grant rate and onboarding completion.

Sign in with Apple - An alternative signup path for iOS users. Segment your funnel by signup method and compare equivalent cohorts before drawing a conclusion about conversion.

Install via Swift Package Manager

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

https://github.com/onramp-sdk/ios

Select the OnRamp product and add it to your app target.

Or add to your Package.swift:

swift
dependencies: [
    .package(url: "https://github.com/onramp-sdk/ios", from: "1.0.0")
]

Initialise the SDK

Call OnRamp.shared.initialize() as early as possible in your app lifecycle:

swift
// AppDelegate.swift
import OnRamp

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        OnRamp.shared.initialize(apiKey: "onr_your_key_here")
        return true
    }
}

For SwiftUI apps:

swift
// MyApp.swift
import SwiftUI
import OnRamp

@main
struct MyApp: App {
    init() {
        OnRamp.shared.initialize(apiKey: "onr_your_key_here")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Tip

Store your API key in a .xcconfig file rather than hardcoding it in source. Reference it as $(ONRAMP_API_KEY) in your code to avoid committing credentials.

Track each onboarding step

swift
import OnRamp

class SignupViewController: UIViewController {
    @IBAction func didTapCreateAccount(_ sender: UIButton) {
        AuthService.createAccount(email: email, password: password) { result in
            switch result {
            case .success:
                // Track after the action succeeds
                OnRamp.shared.step("account_created")
                self.navigateToNextStep()
            case .failure(let error):
                // Optionally track failures
                OnRamp.shared.step("account_creation_failed", properties: [
                    "error_code": error.code
                ])
            }
        }
    }
}

In SwiftUI:

swift
import OnRamp

struct SignupView: View {
    @State private var isCreating = false

    var body: some View {
        Button("Create account") {
            Task {
                do {
                    try await AuthService.createAccount(email: email, password: password)
                    OnRamp.shared.step("account_created")
                    // navigate
                } catch {
                    OnRamp.shared.step("account_creation_failed")
                }
            }
        }
    }
}

Track permission prompts correctly

Permission prompts are major drop-off points in iOS onboarding. Track both outcomes:

swift
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in
    DispatchQueue.main.async {
        if granted {
            OnRamp.shared.step("push_permission_granted")
        } else {
            OnRamp.shared.step("push_permission_denied")
        }
    }
}

This lets you see in the funnel how many users deny notifications - and whether that denial correlates with overall drop-off (it usually does if you ask too early).

Recommended step map for iOS onboarding

StepEvent nameWhen to fire
App opened first timeapp_first_openIn applicationDidBecomeActive, gated by UserDefaults flag
Signup startedsignup_startedOn first tap of "Get started" or "Sign up"
Account createdaccount_createdAfter successful account creation
Email verifiedemail_verifiedWhen deep link returns to app
Notifications allowedpush_permission_grantedIn notification permission callback
First meaningful actionfirst_actionAfter user completes first core task

Build the funnel

1

Open the OnRamp dashboard → Funnel → New funnel

Add your iOS app and name the funnel.

2

Add each step name in order

Enter step names exactly as you pass them to OnRamp.shared.step(). Add both happy-path and failure steps if you want to see error rates in context.

3

Filter by OS if needed

If you have a cross-platform product, filter the funnel to iOS-only to see platform-specific numbers without Android averaging them out.

What iOS funnels commonly reveal

The most common iOS-specific findings:

iOS permission grant rate formula

Grant rate = granted ÷ (granted + denied) × 100

140 granted ÷ (140 + 60) = 70% push permission grant rate


iOS onboarding analytics

See where your iOS users drop off

The OnRamp Swift SDK is three lines to set up. No ATT prompt, no IDFA, no data pipeline. Per-step drop-off, session timelines, and retention cohorts - live in minutes.

Start free trial →