Choose an iOS installation
このページはまだあなたの言語に翻訳されていません。 現在取り組んでいますので、後でもう一度確認してください。
You can add Amplitude Analytics to an Apple platform app with one of three packages. The packages differ in which products they include and which install methods they support. Use one Amplitude analytics package per app. Two packages in the same app create two instances, which can send events twice.
Choose an installation method
| Package | Products | Install with | Best for |
|---|---|---|---|
iOS Swift SDK (AmplitudeSwift) | Analytics. Add other products as separate packages. | Swift Package Manager, CocoaPods, Carthage | Apps that need Analytics only, or that install with Carthage |
Unified SDK for Swift (AmplitudeUnified) | Analytics, Feature Experiment, and Session Replay (iOS only) | Swift Package Manager, CocoaPods | Apps that use two or more products and want to configure them with one initializer |
iOS SDK (Amplitude-iOS), maintenance | Analytics | Existing installations | Apps that already use it. Don't start new projects with it. |
Product support by package
| Product | iOS Swift SDK | Unified SDK for Swift | iOS SDK (maintenance) |
|---|---|---|---|
| Analytics | ✅ Included | ✅ Included | ✅ Included |
Feature Experiment (AmplitudeExperiment) | ➕ Separate package | ✅ Included | ➕ Separate package |
Session Replay (AmplitudeSessionReplay) | ➕ Separate plugin | ✅ Included, iOS only | ➕ Separate middleware |
Guides and Surveys (AmplitudeEngagementSwift) | ➕ Separate plugin | ➕ Separate plugin | ➕ Separate package, started with boot |
Session Replay supports iOS only. On macOS, tvOS, watchOS, and visionOS, the Unified SDK includes Analytics and Feature Experiment.
Choose between the iOS Swift SDK and the Unified SDK
The Unified SDK for Swift (AmplitudeUnified) bundles the iOS Swift SDK (AmplitudeSwift), so tracking, identity, and autocapture work the same in both. Choose by the products you need and how you install:
- Analytics only, or Carthage: install the iOS Swift SDK. The Unified SDK doesn't support Carthage. Add products one at a time as you need them:
- Feature Experiment, Session Replay, or both, configured with one initializer: install the Unified SDK for Swift. The Unified SDK shares the Analytics user ID, device ID, and server zone with each product.
The Unified SDK has fewer Analytics options at initialization than the iOS Swift SDK. For example, you can't set networkTrackingOptions from Swift. For the full list, go to AnalyticsConfig.
With either package, add Guides and Surveys as a plugin on the same Amplitude instance. Go to the Guides and Surveys iOS SDK.
Check platform and tool requirements
| Requirement | iOS Swift SDK | Unified SDK for Swift |
|---|---|---|
| Xcode | 16.3 or later | 16.3 or later |
| Minimum deployment target | iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 7.0, visionOS 1.0 | With Swift Package Manager in Xcode 27 or later: iOS 15.0, macOS 12, tvOS 15, watchOS 9, visionOS 1.0. Otherwise the same as the iOS Swift SDK. |
| Objective-C | Supported | Supported. Requires 0.0.2 or later. |
| Carthage | Supported | Not supported |
Guides and Surveys requires iOS 15 or later, whichever package you use.
Move from one package to another
- From the maintenance iOS SDK to the iOS Swift SDK: go to the iOS SDK migration guide.
- From the iOS Swift SDK and separate Experiment and Session Replay packages to the Unified SDK: go to Migrate from the individual SDKs. If you keep the same
instanceName, users keep their device ID.
これは役に立ちましたか?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.