A single interface for Amplitude Analytics, Experiment, and Session Replay (iOS only). For full documentation, see Unified SDK for Swift.
Swift Package Manager: In Xcode, File → Swift Package Manager → Add Package Dependency, then add:
https://github.com/amplitude/AmplitudeUnified-Swift
CocoaPods: Add to your Podfile and run pod install:
pod 'AmplitudeUnified', '~> 0.0'let amplitude = Amplitude(apiKey: "YOUR_API_KEY")
amplitude.track(eventType: "Button Clicked", eventProperties: ["button_id": "sign_up"])
let identify = Identify()
identify.set(property: "plan", value: "premium")
amplitude.identify(identify: identify)
amplitude.setUserId(userId: "user@example.com")For configuration, Experiment, Session Replay, identity management, and more, see the Amplitude documentation.