이 페이지에서

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.

Install an Amplitude mobile SDK

이 페이지는 아직 귀하의 언어로 번역되지 않았습니다. 현재 작업 중이므로 곧 다시 확인해 주십시오.

For mobile engineers10 minBeginner

This quickstart installs an Amplitude SDK in a mobile app. Pick your platform: iOS (Swift), Android (Kotlin), React Native, or Flutter. Each platform takes three steps: install, initialize, and track your first event.

Prerequisites

  • An Amplitude project and its API key. Create a free Amplitude account if you need one.
  • Access to your app's codebase.

Install the SDK

The Unified SDK for Swift includes Analytics, Experiment, and Session Replay.

  1. Install

    Add the SDK to your Xcode project

    Choose Swift Package Manager or CocoaPods to install the Unified SDK.

    Swift Package Manager: In Xcode, navigate to File > Add Package Dependencies and enter:

    text
    https://github.com/amplitude/AmplitudeUnified-Swift
    

    CocoaPods: Add to your Podfile, then run pod install:

    ruby
    pod 'AmplitudeUnified', '~> 0.0.4'
    
  2. Initialize

    Initialize the SDK

    Add this to your app delegate or @main entry point:

    swift
    import AmplitudeUnified
    
    let amplitude = Amplitude(apiKey: "AMPLITUDE_API_KEY")
    
  3. Track

    Track your first event

    swift
    amplitude.track(eventType: "Button Clicked")
    

For full configuration options, refer to Unified SDK for Swift.

Confirm that events arrive

After you track your first event, open the Amplitude Debugger to confirm that it reaches your project.

이 내용이 도움이 되었나요?