Swiftpack.co - Package - amplitude/Amplitude-iOS

CocoaPods Carthage compatible All Contributors

Official Amplitude iOS SDK

iOS/tvOS/macOS SDK for tracking events and revenue to Amplitude.

Installation and Quick Start

Demo Applications



Click here to view the iOS SDK Changelog.

Need Help?

If you have any problems or issues over our SDK, feel free to create a github issue or submit a request on Amplitude Help.


Stars: 203


Used By

Total: 0


v7.2.0 -

7.2.0 (2020-10-26)

Bug Fixes

  • macOS 10.11/10.13 compile warning fix (#309) (d834b6c)


v7.1.1 -

7.1.1 (2020-10-20)

Bug Fixes

v7.1.0 -

  • Add support to view/copy userId, deviceId to use Event Explorer (BETA). NOTE: This feature doesn't support Swift Package Manager yet.
  • Removed Amplitude-iOS.podspec from repo.

v7.0.1 -

  • Fix issues for nullable/nonnull declaration in Amplitude.h
  • Fix #286
  • Fix #285

v7.0.0 -


Background: Users reported that IDFA MACRO still do not prevent app rejections. So we make both idfa and location tracking to be fully customer driven.

  • Add adSupportBlock to let idfa tracking to be customer driven.
  • Add locationInfoBlock to let location tracking to be customer driven.
  • Remove enableLocationListening, disableLocationListening and updateLocation APIs.

v6.0.0 -

  • To accommodate the new rules over IDFA in iOS 14, we make some changes over our IDFA logic.
  • Added AMPLITUDE_IDFA_TRACKING MARCO to control if IDFA logic is included in the binary.
  • Removed disableIdfaTracking API.
  • Documentation

v5.3.0 -

  • Introducing useDynamicConfig flag!! Turning this flag on will find the best server url automatically based on users' geo location.
  • Note 1. If you have your own proxy server and use setServerUrl API, please leave this OFF.
  • Note 2. If you have users in China Mainland, we suggest you turn this on.
  • Note 3. By default, this feature is OFF. So you need to explicitly set it to ON to use it.

Related issues: #260 , #257

v5.2.1 -

  • Removed obsolete certificates used for SSL Pinning before.

v5.2.0 -

  • Fixed an implementation issue in SSL pinning. If you're using SSL pinning, please update your SDK ASAP.

v5.1.0 -

  • Added APIs to Amplitude to let users set library name and version. This should be only used when you develop your own library which wraps Amplitude iOS SDK.

v5.0.0 -

  • Now macOS support!
  • Covered both cases. (1) pure macOS App, (2) Mac Catalyst (Running iPad App on macOS)
  • NOTE 1: CocoaPods users! Amplitude-iOS pod is deprecated (4.10.0 is the last version we support). Please use the new one Amplitude going forward.
  • NOTE 2: If you encounter any issues when instrumenting your macOS App, please reach out to us!
  • NOTE 3: Minimum supported iOS version is now 10.0 instead of 8.0 in the past. We made this decision since usages for 9.0 and 8.0 are extremely low now. (<= 1%)
  • Please find new pod here! New https://cocoapods.org/pods/Amplitude

v4.10.0 -

  • Now you can enable or disable COPPA (Children's Online Privacy Protection Act) restrictions on IDFA, IDFV, city, IP address and location tracking.
  • To enable COPPA, please call [[Amplitude instance] enableCoppaControl];.
  • To disable COPPA, please call [[Amplitude instance] disableCoppaControl];.
  • Fix partial truncation for string with unicode (e.g. emoji).

v4.9.3 -

Fix error for not finding declaration for NSObject when using Swift Package Manager

v4.9.0 -

Added support for Swift Package Manager. Kudos to contribution from @mayur1407.


Ensure background tasks are always ended and add safeguard before retrieving the app by checking for valid uploadTaskID

v4.8.1 -

  • Suppress NSLogs for non-dev environments.

v4.8.0 -

  • Identify Macs for Mac Catalyst support.

v4.7.1 -

  • Fix issue where tag wasn't included in tag spec

v4.7.0 -

  • Fix bug where background task might be stopped before final events are flushed
  • Revert logic to restore db from memory on potential db resets

v4.6.0 -

  • Add support for installing on tvOS platform via Carthage
  • Do not use IDFV or IDFA for device ID if disabled via tracking options
  • Close Sqlite DB object even if open fails
  • Made startOrContinueSession public method. Only call this if you know what you are doing. This may trigger a new session to start.
  • Properly end background event flush task
  • Increased minimum iOS deployment target to 8.0

v4.5.0 -

  • Add ability to set a custom server URL for uploading events using setServerUrl.

v4.4.0 -

  • Add ability to set group properties via a new groupIdentifyWithGroupType method that takes in an AMPIdentify object as well as a group type and group name.

v4.3.1 -

  • Update SDK to better handle SQLite Exceptions.

v4.3.0 -

  • Add AMPTrackingOptions interface to customize the automatic tracking of user properties in the SDK (such as language, ip_address, platform, etc). See Help Center Documentation for instructions on setting up this configuration.

v4.2.1 -

  • Fix a bunch of compiler warnings
  • Fix SSLPinning import so that it doesn't corrupt debug console. Thanks to @rob-keepsafe for the PR

v4.2.0 -

  • Added a setUserId method with optional boolean argument startNewSession, which when YES starts a new session after changing the userId.

v4.1.0 -

  • Add option to disable IDFA tracking. To disable IDFA tracking call [[Amplitude instance] disableIdfaTracking]; before initializing with your API key.

v4.0.4 -

  • Fix bug where events in the initial session for brand new users have a session id of -1 (introduced in v4.0.2).

v4.0.3 -

  • Fix unknown carrier caching. This fixes "Could not successfully update network info during initialization" warnings when logging events on devices without SIM cards.

v4.0.2 -

  • Ensure the foreground checker in initializeApiKey runs on the main thread. This fixes the "UI API called on a background thread" warning.
  • Removing unnecessary try / catch when looking up device carrier.