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

Please visit our :100:Developer Center for instructions on installing and using our the SDK.

Demo Applications


Hao Liu

📖 💻

Daniel Jih

💻 📖

Curtis Liu

💻 📖 🤔

Spenser Skates

💻 📖 🤔

Krishna Rajendran


samantha puth




Rob Phillips



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: 195


Used By

Total: 0


v7.0.1 - 2020-09-20 18:27:58

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

v7.0.0 - 2020-09-15 06:21:35


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 - 2020-08-20 05:16:07

  • 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 - 2020-08-07 04:41:29

  • 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 - 2020-07-07 05:26:40

  • Removed obsolete certificates used for SSL Pinning before.

v5.2.0 - 2020-06-03 00:57:47

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

v5.1.0 - 2020-03-17 05:35:23

  • 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 - 2020-03-12 07:43:21

  • 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 - 2020-02-04 19:18:04

  • 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 - 2019-11-23 01:16:45

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

v4.9.0 - 2019-11-21 23:23:03

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

- 2019-10-07 17:27:23

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

v4.8.1 - 2019-09-24 18:19:38

  • Suppress NSLogs for non-dev environments.

v4.8.0 - 2019-09-24 18:19:07

  • Identify Macs for Mac Catalyst support.

v4.7.1 - 2019-09-24 18:18:39

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

v4.7.0 - 2019-09-24 18:18:07

  • 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 - 2019-03-02 00:41:05

  • 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 - 2018-12-19 00:46:28

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

v4.4.0 - 2018-10-16 00:47:50

  • 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 - 2018-08-14 18:58:10

  • Update SDK to better handle SQLite Exceptions.

v4.3.0 - 2018-07-25 03:37:21

  • 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 - 2018-05-21 18:21:37

  • 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 - 2018-04-20 01:23:52

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

v4.1.0 - 2018-02-28 00:40:12

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

v4.0.4 - 2017-10-24 00:12:19

  • 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 - 2017-10-16 21:26:03

  • 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 - 2017-10-13 22:53:46

  • 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.

v4.0.1 - 2017-09-18 23:31:45

  • Lowering minimum required iOS version down to 7.0.

v4.0.0 - 2017-09-18 22:34:36

  • Minimum required iOS version is now 9.0
  • Removed deprecated methods, fixed warnings in Xcode 9, adding support for iOS 11.
  • Migrate setup instructions and SDK documentation in the README file to Zendesk articles.

v3.14.1 - 2017-03-15 04:22:16

  • Catch exceptions when looking up device carrier.
  • Fix build warnings caused by certificate files in the Podfile. Thanks to @benasher44 for the PR.
  • Fix warnings for missing new line at end of files. Thanks to @teanet for reporting.
  • Fix linker warnings when using Amplitude framework in an extension target. Thanks to @r-peck for the PR.