Browse docs

Jump to core topics without leaving the page.

Swift SDK

Add FlashAnalytics to native Apple apps with the Swift SDK.

The Swift SDK supports iOS, macOS, tvOS, and watchOS tracking with a native API surface.

Best for

  • Native iOS and macOS apps
  • Teams wanting Swift-native APIs
  • Mobile analytics with offline support

Install

Add the SDK via Swift Package Manager and configure your client ID.

Install FlashAnalytics

Initialize

let fa = FlashAnalytics(appId: "YOUR_CLIENT_ID")

Track events

fa.track("screen_viewed", [
  "screen": "Onboarding"
])

Offline behavior

Events are queued locally and sent when connectivity is restored.