Platform

AI

Amplitude AI
Analytics that never stops working
AI Agents
Sense, decide, and act faster than ever before
AI Visibility
See how your brand shows up in AI search
AI Feedback
Distill what your customers say they want
Amplitude MCP
Insights from the comfort of your favorite AI tool

Insights

Product Analytics
Understand the full user journey
Marketing Analytics
Get the metrics you need with one line of code
Session Replay
Visualize sessions based on events in your product
Heatmaps
Visualize clicks, scrolls, and engagement

Action

Guides and Surveys
Guide your users and collect feedback
Feature Experimentation
Innovate with personalized product experiences
Web Experimentation
Drive conversion with A/B testing powered by data
Feature Management
Build fast, target easily, and learn as you ship
Activation
Unite data across teams

Data

Data Governance
Complete data you can trust
Integrations
Connect Amplitude to hundreds of partners
Security & Privacy
Keep your data secure and compliant
Warehouse-native Amplitude
Unlock insights from your data warehouse
Solutions
Solutions that drive business results
Deliver customer value and drive business outcomes
Amplitude Solutions →

Industry

Financial Services
Personalize the banking experience
B2B
Maximize product adoption
Media
Identify impactful content
Healthcare
Simplify the digital healthcare experience
Ecommerce
Optimize for transactions

Use Case

Acquisition
Get users hooked from day one
Retention
Understand your customers like no one else
Monetization
Turn behavior into business

Team

Product
Fuel faster growth
Data
Make trusted data accessible
Engineering
Ship faster, learn more
Marketing
Build customers for life
Executive
Power decisions, shape the future

Size

Startups
Free analytics tools for startups
Enterprise
Advanced analytics for scaling businesses
Resources

Learn

Blog
Thought leadership from industry experts
Resource Library
Expertise to guide your growth
Compare
See how we stack up against the competition
Glossary
Learn about analytics, product, and technical terms
Explore Hub
Detailed guides on product and web analytics

Connect

Community
Connect with peers in product analytics
Events
Register for live or virtual events
Customers
Discover why customers love Amplitude
Partners
Accelerate business value through our ecosystem

Support & Services

Customer Help Center
All support resources in one place: policies, customer portal, and request forms
Developer Hub
Integrate and instrument Amplitude
Academy & Training
Become an Amplitude pro
Professional Services
Drive business success with expert guidance and support
Product Updates
See what's new from Amplitude

Tools

Benchmarks
Understand how your product compares
Templates
Kickstart your analysis with custom dashboard templates
Tracking Guides
Learn how to track events and metrics with Amplitude
Maturity Model
Learn more about our digital experience maturity model
Pricing
LoginContact salesGet started

AI

Amplitude AIAI AgentsAI VisibilityAI FeedbackAmplitude MCP

Insights

Product AnalyticsMarketing AnalyticsSession ReplayHeatmaps

Action

Guides and SurveysFeature ExperimentationWeb ExperimentationFeature ManagementActivation

Data

Data GovernanceIntegrationsSecurity & PrivacyWarehouse-native Amplitude
Amplitude Solutions →

Industry

Financial ServicesB2BMediaHealthcareEcommerce

Use Case

AcquisitionRetentionMonetization

Team

ProductDataEngineeringMarketingExecutive

Size

StartupsEnterprise

Learn

BlogResource LibraryCompareGlossaryExplore Hub

Connect

CommunityEventsCustomersPartners

Support & Services

Customer Help CenterDeveloper HubAcademy & TrainingProfessional ServicesProduct Updates

Tools

BenchmarksTemplatesTracking GuidesMaturity Model
LoginSign Up

An iOS Analytics Quick Start Guide

How-to guide on getting started with the Amplitude iOS SDK.
Product

Oct 6, 2016

6 min read

Archana Madhavan

Archana Madhavan

Senior Learning Experience Designer, Amplitude

An iOS Analytics Quick Start Guide

This Quick Start Guide will walk you step-by-step through how to download and integrate the Amplitude iOS SDK into your application. For a reference on events and sessions, read here.

If you’re ready to get started, read on!

Step 1: Register for an Account

Start by registering for an account at https://amplitude.com. You will be assigned an API key which you’ll see as soon as you log in under Settings.

1-image

You’ll definitely want to record this key somewhere or set it as an environmental variable so you don’t have to constantly be referring back to this page.

Step 2: Download the Source

The next step is to download the source code, then extract the zip file it comes in. Extract the Amplitude folder into your app’s root directory, or use the dependency managers CocoaPods or Carthage, which will do this automatically.
For Cocoapods, add the following line to your Podfile:

pod 'Amplitude-iOS', '~> 3.8.5'.

If you are using CocoaPods, then steps 3 and 4 below will automatically be done for you, so skip to 5.

For Carthage, add the following line to your Cartfile:

github "amplitude/Amplitude-iOS".

2-image

Then, to import Amplitude into your app, add the following line of code to your headers:

#import <Amplitude/Amplitude.h>

3-image

Step 3: Copy Amplitude into Xcode

Copy the Amplitude sub-folder into the source of your project in Xcode. Check “Copy items into destination group’s folder (if needed).”

4-image

This loads the Amplitude code right into the control system of your project allowing it to access all relevant files.

Step 4: Build SQLite Flag

Amplitude’s iOS SDK requires the SQLite library, which is included in iOS but requires an additional build flag to enable. The SQLite library implements an SQL database engine that helps read the SDK code.

In your project’s Build Settings and your Target’s Build Settings, under Linking -> Other Linker Flags, add the flag -lsqlite3.0.

5-image

Step 5: Add Amplitude to Analytics Files

In every file that uses analytics, import Amplitude.h at the top. These include files that contain event logic, user definitions or any data that you’d like to track and analyze.

This code will include the Amplitude framework into the file and allow Amplitude access to those analytics.

#import "Amplitude.h"

We’ll pull examples from a 2048 demo application with Google Tag Manger (GTM) integrated to demonstrate how these steps are followed.

In this [AmplitudeGTMHandlers.m](https://github.com/amplitude/GTM-iOS-Demo/blob/master/m2048/AmplitudeGTMHandler.m) file we see:

6-image

Step 6: Initialize SDK

For every file in which you intend to grab data to analyze in Amplitude, you need to initialize the SDK. In the application:didFinishLaunchingWithOptions: method of your YourAppNameAppDelegate.m file, you initialize the SDK:

[[Amplitude instance] initializeApiKey:@"YOUR_API_KEY_HERE"];

You can see an example in [M2AppDelegate.m](https://github.com/amplitude/GTM-iOS-Demo/blob/master/m2048/M2AppDelegate.m):

7-image

Great work! At this point you’ve integrated the SDK into your app and are ready to start tracking analytics. Read on below to dive deeper into how events are tracked and logged, along with other potential integration options you have.

Track Events

Events are defined as any user action taken within your app. Amplitude is an event-based analytics platform so it’s important to choose and track events strategically.

To track an event anywhere in the app, call:

[[Amplitude instance] logEvent:@"EVENT_IDENTIFIER_HERE"];

“logEvent” works as a Function Call meaning when you want to log an event, you push a “logEvent” event to the data layer with the variables for “eventType” and “eventProperties.” This activates the logEvent trigger, which activates the logEvent tag. The function logEvent is then called in the Handler file, here it’s the AmplitudeGTMHandler.m file. This calls the SDK’s logEvent.

We see this implemented in this [M2GameManager.m](https://github.com/amplitude/GTM-iOS-Demo/blob/master/m2048/State/M2GameManager.m#L208-L209) file:

8-image

Log Events

Events are saved locally. Uploads are batched to occur every 30 events and every 30 seconds, as well as on app close. You can track Realtime Activity to see how your recent active users are interacting with your app.

9-image

After calling logEvent in your app, you will immediately see data appear on the Amplitude Website. As soon as a user logs an event, you can go into Activity Details to see what they’ve done.

10-image

Push Notifications

A session is a period of time that a user has your app in the foreground. Sessions are used to separate groups of events. It is possible to log events that don’t occur during a session, for example push notifications, so they don’t go untracked.

Out of session events have a session_id of -1 and are not considered part of the current session, meaning they do not extend the current session. You can log events as out of session by setting input parameter “outOfSession” to true when calling logEvent.

[[Amplitude instance] logEvent:@"EVENT_IDENTIFIER_HERE" withEventProperties:nil outOfSession:true];

Extensions

App extensions allow you to implement custom functionality and content into your app and make it available to users while they’re interacting with other apps, or they’re not exclusively in your app. The Amplitude iOS-SDK can be modified to integrate with these extensions as well.

For those interested in including extensions, you can read more about it in the DemoNotes project code.

About the author
Archana Madhavan

Archana Madhavan

Senior Learning Experience Designer, Amplitude

More from Archana

Archana is a Senior Learning Experience Designer on the Customer Education team at Amplitude. She develops educational content and courses to help Amplitude users better analyze their customer data to build better products.

More from Archana
Topics
Platform
  • Product Analytics
  • Feature Experimentation
  • Feature Management
  • Web Analytics
  • Web Experimentation
  • Session Replay
  • Activation
  • Guides and Surveys
  • AI Agents
  • AI Visibility
  • AI Feedback
  • Amplitude MCP
Compare us
  • Adobe
  • Google Analytics
  • Mixpanel
  • Pendo
  • Optimizely
  • Fullstory
  • LauchDarkly
  • Heap
Resources
  • Resource Library
  • Blog
  • Product Updates
  • Amp Champs
  • Amplitude Academy
  • Events
  • Glossary
Partners & Support
  • Contact Us
  • Customer Help Center
  • Community
  • Developer Docs
  • Find a Partner
  • Become an affiliate
Company
  • About Us
  • Careers
  • Press & News
  • Investor Relations
  • Diversity, Equity & Inclusion
Terms of ServicePrivacy NoticeAcceptable Use PolicyLegal
EnglishJapanese (日本語)Korean (한국어)Español (LATAM)Español (Spain)Português (Brasil)Português (Portugal)FrançaisDeutsch
© 2026 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.
Blog
InsightsProductCompanyCustomers
Topics

101

AI

APJ

Acquisition

Adobe Analytics

Agents

Amplify

Amplitude Academy

Amplitude Activation

Amplitude Analytics

Amplitude Audiences

Amplitude Community

Amplitude Feature Experimentation

Amplitude Full Platform

Amplitude Guides and Surveys

Amplitude Heatmaps

Amplitude Made Easy

Amplitude Session Replay

Amplitude Web Experimentation

Amplitude on Amplitude

Analytics

B2B SaaS

Behavioral Analytics

Benchmarks

Churn Analysis

Cohort Analysis

Collaboration

Consolidation

Conversion

Customer Experience

Customer Lifetime Value

DEI

Data

Data Governance

Data Management

Data Tables

Digital Experience Maturity

Digital Native

Digital Transformer

EMEA

Ecommerce

Employee Resource Group

Engagement

Event Tracking

Experimentation

Feature Adoption

Financial Services

Funnel Analysis

Getting Started

Google Analytics

Growth

Healthcare

How I Amplitude

Implementation

Integration

LATAM

LLM

Life at Amplitude

MCP

Machine Learning

Marketing Analytics

Media and Entertainment

Metrics

Modern Data Series

Monetization

Next Gen Builders

North Star Metric

Partnerships

Personalization

Pioneer Awards

Privacy

Product 50

Product Analytics

Product Design

Product Management

Product Releases

Product Strategy

Product-Led Growth

Recap

Retention

Revenue

Startup

Tech Stack

The Ampys

Warehouse-native Amplitude

Recommended Reading

article card image
Read 
Customers
How The Economist Gets Insights in Seconds, Saving Analysts Hours

Feb 13, 2026

7 min read

article card image
Read 
Product
Amplitude Expands AI Visibility Tool

Feb 5, 2026

7 min read

article card image
Read 
Customers
How Ramp Network Turned Data Into 30% Higher Conversions

Feb 5, 2026

5 min read

article card image
Read 
Company
Why Hackathons Are the Best Kept Secret to Drive GTM Innovation

Feb 4, 2026

6 min read

Explore Related Content

101
9 Top Feature Flag Solutions for Modern Product Teams in 2026

Jan 27, 2026

Integration
Using Behavioral Analytics for Growth with the Amplitude App on HubSpot

Jun 17, 2024

10 min read

Personalization
Identity Resolution: The Secret to a 360-Degree Customer View

Feb 16, 2024

10 min read

Product
Inside Warehouse-native Amplitude: A Technical Deep Dive

Jun 27, 2023

15 min read

Guide
5 Proven Strategies to Boost Customer Engagement

Jul 12, 2023

Video
Designing High-Impact Experiments

May 13, 2024

Startup
9 Direct-to-consumer Marketing Tactics to Accelerate Ecommerce Growth

Feb 20, 2024

10 min read

Growth
Leveraging Analytics to Achieve Product-Market Fit

Jul 20, 2023

10 min read