# Installation

How to add Amply to your mobile app. One dependency, three platforms — pick the tab that matches your stack.

Installing Amply means adding a single package to your build config, then calling the SDK from your app's entry point. This page only covers the dependency step. Go to the platform-specific Quickstart once the package resolves.

## Current versions

Other pages in this guide reference "the current version" — the table below is the single source of truth. When a new SDK ships, only this page needs updating.

| Package           | Version |
| ----------------- | ------- |
| iOS / Android SDK | `0.2.5` |
| React Native SDK  | `0.2.9` |

## Requirements

| Platform     | Minimum OS             | Other                                               |
| ------------ | ---------------------- | --------------------------------------------------- |
| iOS SDK      | iOS 14.0               | Xcode 15+, Swift 5.9+                               |
| Android SDK  | Android 5.0 (API 21)   | Kotlin 1.9+, AGP 8.0+                               |
| React Native | RN 0.79+, Expo SDK 54+ | iOS 14+ / Android API 24+, New Architecture enabled |

## Credentials

You need three values from the Amply dashboard before the SDK will run:

* `appId` — your app's identifier (e.g., `com.acme.app`)
* `apiKeyPublic` — short key used to identify your app
* `apiKeySecret` — longer key used to sign requests

Open the Amply dashboard, go to **Settings → API Keys**, and copy them into the config shown in the Quickstarts.

## Install

{% tabs %}
{% tab title="iOS (Swift)" %}

### CocoaPods

Add to your `Podfile`:

```ruby
pod 'AmplySDK', '~> 0.2.5'
```

Then install:

```bash
pod install
```

Open the generated `.xcworkspace` in Xcode.

### Swift Package Manager

In Xcode: **File → Add Package Dependencies…** and enter:

```
https://github.com/amply-tools/amply-sdk-ios
```

Pick the version rule (recommended: *Up to Next Major Version* from `0.2.5`) and add `AmplySDK` to your target.

Or declare it in `Package.swift`:

```swift
dependencies: [
    .package(url: "https://github.com/amply-tools/amply-sdk-ios", from: "0.2.5")
]
```

### Info.plist

No mandatory entries. If you plan to read the advertising identifier (IDFA) for attribution, add `NSUserTrackingUsageDescription` to `Info.plist` and call the App Tracking Transparency prompt yourself — the SDK will pick up the resulting status.

Continue with the [iOS Quickstart](/developer-guide/quickstart-ios.md) to wire the SDK into your `AppDelegate`.
{% endtab %}

{% tab title="Android (Kotlin)" %}

### Gradle (Kotlin DSL)

Add to your app module's `build.gradle.kts`:

```kotlin
dependencies {
    implementation("tools.amply:sdk-android:0.2.5")
}
```

### Gradle (Groovy)

```groovy
dependencies {
    implementation 'tools.amply:sdk-android:0.2.5'
}
```

### Repositories

The SDK ships to Maven Central. If your `settings.gradle.kts` already lists `mavenCentral()` (the default for new Android projects) you don't need to change anything:

```kotlin
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}
```

### Permissions

No permissions are required to initialize the SDK. `INTERNET` (already granted by default) is used to send events. If you want to collect the Google advertising ID for attribution, add:

```xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
```

Continue with the [Android Quickstart](/developer-guide/quickstart-android.md) to wire the SDK into your `Application` class.
{% endtab %}

{% tab title="React Native" %}

### npm / yarn

```bash
yarn add @amplytools/react-native-amply-sdk
```

or

```bash
npm install @amplytools/react-native-amply-sdk
```

### Expo

Amply ships an Expo config plugin. Add it to `app.json`:

```json
{
  "expo": {
    "plugins": ["@amplytools/react-native-amply-sdk"]
  }
}
```

Then run a prebuild so the native modules link:

```bash
npx expo prebuild
```

### Bare React Native

Autolinking picks up the module after `yarn install`. On iOS you also need to install the pod:

```bash
cd ios && pod install
```

No extra Gradle config is required on Android.

### Requirements

* React Native 0.79 or newer with the New Architecture enabled
* Expo SDK 54 or newer (if you're using Expo)
* iOS 14.0+, Android API 24+

Continue with the [React Native Quickstart](/developer-guide/quickstart-react-native.md) to initialize the SDK in your root component.
{% endtab %}
{% endtabs %}

## Related

* [iOS Quickstart](/developer-guide/quickstart-ios.md) — first tracked event from a Swift app
* [Android Quickstart](/developer-guide/quickstart-android.md) — first tracked event from a Kotlin app
* [React Native Quickstart](/developer-guide/quickstart-react-native.md) — first tracked event from TypeScript
* [iOS integration](/developer-guide/ios-integration.md) — deep links, session lifecycle, custom properties
* [Android integration](/developer-guide/android-integration.md) — deep links, custom properties, log levels
* [React Native integration](/developer-guide/react-native-integration.md) — listeners, snapshots, Expo specifics


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amply.tools/developer-guide/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
