> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# Getting started

> **Note**
>
> This guide is relevant for the current Mobile SDK. While we highly recommend using the latest version, if you are using a legacy integration, refer to the [iOS](/applications/ios-how-to-integrate-the-sdk-in-your-application-v3) or [Android](/applications/android-how-to-integrate-the-sdk-in-your-application-v3) documentation.

To get started with the HUMAN SDK, you need to first add the library to your project.

## Add the SDK to your project

#### Android

#### Gradle dependency method

#### Add permissions

Add the following permissions to your `AndroidManifest.xml` file:

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
```

#### Add the library to your dependencies

1. Add the SDK repository to the `repositories` section in your project's `build.gradle` and `settings.gradle`:

```groovy
buildscript {
      repositories {
         google()
         mavenCentral()
         maven { url 'https://jfrog.humansecurity.com/artifactory/human-android-sdk/' }
      }
}
```

```kotlin
buildscript {
      repositories {
         google()
         mavenCentral()
         maven { url = uri("https://jfrog.humansecurity.com/artifactory/human-android-sdk/") }
      }
}
```

2. Add the SDK dependency to the `dependencies` section in your app's `build.gradle`:

```groovy
dependencies {
      implementation 'com.humansecurity:sdk:5.3.3'
}
```

```kotlin
dependencies {
      implementation("com.humansecurity:sdk:5.3.3")
}
```

#### R8 optimization

R8 is a tool that shrinks, secures, and optimizes Android applications, but it can sometimes cause issues with the `ktor` library that's included in the SDK. To prevent this, add the following rule to your `proguard` file:

**`ProGuard`**

```java title="ProGuard"
-keepclassmembers class kotlinx.** {
    volatile <fields>;
}
```

#### Manual integration

#### Add permissions

Add the following permissions to your `AndroidManifest.xml` file:

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
```

#### Download the AAR File

* Download the AAR file from this [link](https://jfrog.humansecurity.com/ui/native/human-android-sdk/com/humansecurity/sdk/5.3.3), OR
* Use the following command:
  ```bash
  curl -LO https://jfrog.humansecurity.com/ui/native/human-android-sdk/com/humansecurity/sdk/5.3.3/sdk-5.3.3.aar
  ```

#### Add the AAR to your project

```groovy
dependencies {
      implementation files('libs/HUMAN-release.aar')
}
```

```kotlin
dependencies {
      implementation(files("libs/HUMAN-release.aar"))
}
```

#### Add the SDK's Dependencies

1. Add the following dependencies to the dependencies section in your app's `build.gradle`. Choose the appropriate version based on your project's `targetSdkVersion`.

```groovy
implementation 'androidx.core:core-ktx:1.19.0' // any version (select 1.10.1 if your app has 'targetSdkVersion 33')
implementation 'androidx.lifecycle:lifecycle-process:2.11.0' // min v2.6.0 (select 2.6.2 if your app has 'targetSdkVersion 33')
implementation 'androidx.datastore:datastore-preferences:1.2.1' // any version (select 1.0.0 if your app targets API 33)
implementation 'com.google.android.material:material:1.14.0' // min v1.10.0 (select 1.9.0 if your app has 'targetSdkVersion 33')
implementation 'com.fasterxml.uuid:java-uuid-generator:5.2.0' // min v3.0.0
implementation 'io.ktor:ktor-client-okhttp:3.5.1' // min v3.0.0
```

```kotlin
implementation("androidx.core:core-ktx:1.19.0") // any version (select 1.10.1 if your app has 'targetSdkVersion 33')
implementation("androidx.lifecycle:lifecycle-process:2.11.0") // min v2.6.0 (select 2.6.2 if your app has 'targetSdkVersion 33')
implementation("androidx.datastore:datastore-preferences:1.2.1") // any version (select 1.0.0 if your app targets API 33)
implementation("com.google.android.material:material:1.14.0") // min v1.10.0 (select 1.9.0 if your app has 'targetSdkVersion 33')
implementation("com.fasterxml.uuid:java-uuid-generator:5.2.0") // min v3.0.0
implementation("io.ktor:ktor-client-okhttp:3.5.1") // min v3.0.0
```

2. If you integrate with the HUMAN [Doctor App](/applications/sdk/v5/verify-and-test), also add the following dependencies. If you don't integrate with the Doctor App, skip this step.

```groovy
implementation platform('androidx.compose:compose-bom:2026.06.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material-icons-extended'
implementation 'androidx.compose.foundation:foundation'
implementation 'androidx.activity:activity-compose:1.13.0'
implementation 'androidx.lifecycle:lifecycle-runtime-compose:2.11.0'
```

```kotlin
implementation(platform("androidx.compose:compose-bom:2026.06.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.foundation:foundation")
implementation("androidx.activity:activity-compose:1.13.0")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.11.0")
```

#### R8 optimization

R8 is a tool that shrinks, secures, and optimizes Android applications, but it can sometimes cause issues with the `ktor` library that's included in the SDK. To prevent this, add the following rule to your `proguard` file:

**`ProGuard`**

```java title="ProGuard"
-keepclassmembers class kotlinx.** {
    volatile <fields>;
}
```

#### iOS, iPadOS, & visionOS

#### Swift Package Manager

Add the package from the the [`human-security-ios-sdk-spm`](https://github.com/PerimeterX/human-security-ios-sdk-spm) repository.

> **Note**
>
> [`human-security-ios-sdk-spm`](https://github.com/PerimeterX/human-security-ios-sdk-spm) is a specialized repository that contains a pointer to the precompiled XCFramework included in the latest HUMAN SDK release, allowing for quicker downloads. We recommend using this repository rather than the main [`human-security-ios-sdk`](https://github.com/PerimeterX/human-security-ios-sdk) repository.

#### CocoaPods

Add the [HUMAN pod](https://cocoapods.org/pods/HUMAN) to your `Podfile`:

```ruby
platform :ios, '13.0'
use_frameworks!

target '<Your App Name>' do
   pod 'HUMAN', '5.3.3'
end
```

#### Add the XCFramework file manually

1. Download the [human-security-ios-sdk](https://github.com/PerimeterX/human-security-ios-sdk) repository.

2. Unzip the file and copy the `HUMAN.xcframework` to your project.

3. In Xcode, add the `xcframework` to the **Frameworks, Libraries, and Embedded Content** section of your target.

## Handle multiple Application IDs

If you have multiple HUMAN Applications and Application IDs, you can use the following to support all of them within the SDK:

1. Call the `HumanSecurity/start(appIds:policy:)` function and provide all your Application IDs.
2. Pass the relevant ID to each function that requires the `appId` parameter. For single AppID apps, the value may be `nil` or `null`.

## Finish your integration

Next, follow the respective guides based on your environment and requirements:

#### Native & hybrid apps

<table>
  <thead>
    <tr>
      <th>Implementation</th>

      <th>Details</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [Native (recommended implementation](/applications/sdk/v5/native-easiest-implementation)
      </td>

      <td>
        * Fast integration with minimal points.
        * SDK intercepts your URL requests.
        * Handles blocked requests.
        * **Not recommended** if you need to retry requests after solving challenges.
        * **Not recommended** if you use advanced `URLSession` features (authentication challenges, caching, etc.).
      </td>
    </tr>

    <tr>
      <td>
        [Native (basic implementation)](/applications/sdk/v5/native-basic-implementation)
      </td>

      <td>
        * Few integration points.
        * SDK **does not** intercept URL requests.
        * Handles blocked requests.
        * Notifies when a challenge is solved or canceled; great for analytics and logs.
        * **Not recommended** for retrying requests after challenges.
        * **Not recommended** as a trigger for resending URL requests.
      </td>
    </tr>

    <tr>
      <td>
        [Native (advanced functionality)](/applications/sdk/v5/native-advanced-functionality)
      </td>

      <td>
        * SDK intercepts URL requests.
        * Handles blocked requests with challenge results (solved/canceled); great for analytics, logs, and resending URL requests.
        * Option to automatically retry blocked requests after challenges.
        * **Recommended** if you need to retry requests after challenges.
        * **Not recommended** if you use advanced `URLSession` features.
      </td>
    </tr>

    <tr>
      <td>
        [Hybrid app](/applications/sdk/v5/hybrid-app-integration)
      </td>

      <td>
        * Use this when the app loads a HUMAN-protected site in an in-app WebView and also makes native URL requests.
        * Keeps the native SDK VID and the WebView VID the same.
        * Set `hybridAppPolicy.webRootDomains` to the site's registrable root.
      </td>
    </tr>

    <tr>
      <td>
        [WebView container support](/applications/sdk/v5/webview-container-support)
      </td>

      <td>
        * Shows which WebView containers can share the native VID.
        * Covers native WebViews and wrapper-hosted WebViews, such as React Native, Flutter, Ionic, and Expo.
      </td>
    </tr>

    <tr>
      <td>
        visionOS
      </td>

      <td>
        * [Challenge presentation via window](/applications/sdk/v5/visionos-integration-window)
        * [Challenge presentation via sheet](/applications/sdk/v5/visionos-integration-sheet)
      </td>
    </tr>
  </tbody>
</table>

#### Other platforms

* [React Native (recommended)](/applications/sdk/v5/react-native-integration-recommended)
* [React Native (legacy)](/applications/sdk/v5/react-native-integration-legacy)
* [Flutter](/applications/sdk/v5/flutter-integration)
* [Ionic](/applications/sdk/v5/ionic-integration)
* [gRPC](/applications/sdk/v5/grpc-integration)
* [Expo](/applications/sdk/v5/expo-integration)

## Verify & test the integration

Use our [guide](/applications/sdk/v5/verify-and-test) to verify and test the SDK integration in your app.