Getting Started
iOS
Integrate the Measure SDK in your iOS app.
Minimum requirements
| Name | Version |
|---|---|
| Xcode | 15.0+ |
| Minimum iOS Deployments | 13.0+ |
| Swift Version | 5.10+ |
1. Get the credentials
Create a new app in the Apps section on the dashboard and copy its API URL and API Key.
2. Install the SDK
// In Package.swift
.package(url: "https://github.com/measure-sh/measure.git", branch: "ios-v0.13.1")3. Initialize the SDK
Initialize as early as possible to capture early crashes and accurate launch time metrics.
// In your AppDelegate's application(_:didFinishLaunchingWithOptions:)
import Measure
let clientInfo = ClientInfo(apiKey: "<apiKey>", apiUrl: "<apiUrl>")
let config = BaseMeasureConfig()
Measure.initialize(with: clientInfo, config: config)4. Verify installation
Add a test crash after Measure.initialize, run the app, and confirm it reaches your dashboard.
// In your AppDelegate, after Measure.initialize.
// The 2-second delay gives the SDK time to flush the crash event.
// Remove this after the crash appears in your dashboard.
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
fatalError("Test crash from Measure")
}Remove the test crash code once you've confirmed the crash appears in your dashboard.
Think this page can be better?
Open an issue