> For the complete documentation index, see [llms.txt](https://docs.indicio.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.indicio.tech/developer/mobile-solutions/mobile-sdk/installation.md).

# Installation

## iOS

{% stepper %}
{% step %}

### Open your project in Xcode

Open your iOS project in Xcode and click on your project name under the targets section.
{% endstep %}

{% step %}

### Locate frameworks

Scroll down in the General tab until you see the Frameworks section of the project.
{% endstep %}

{% step %}

### Add the SDK

Click on the + button under Frameworks.
{% endstep %}

{% step %}

### Select the XCFramework

Select "Add Files…" in the bottom-left dropdown and select the Proven SDK XCFramework to add it to your project.
{% endstep %}
{% endstepper %}

## Android

### Recommended: Add GitHub authentication to local.properties (or other secrets file)

In order to consume the Proven mobile SDK for Android you must have access to Maven repos hosted on GitHub. Add your GitHub username and a GitHub personal access token with read permissions to your `local.properties` and access those values in your `build.gradle`.

Info for creating a personal access token can be [found here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

Official documentation for reading values from the `local.properties` can be [found here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#example-using-gradle-groovy-for-a-single-package-in-a-repository).

### Android Installation

{% stepper %}
{% step %}

### Add repositories

Add the below repos to your Android repository list.

{% code title="build.gradle.kts" %}

```
```

{% endcode %}

```kotlin
// Example function to read values from local.properties in a build.gradle.kts file
fun readLocalProperty(key: String): String? {
    val localPropertiesFile = File(rootDir, "local.properties")
    if (localPropertiesFile.exists()) {
        val properties = Properties()
        localPropertiesFile.inputStream().use { properties.load(it) }
        return properties.getProperty(key)
    }
    return null
}

repositories {
    maven {
        setUrl("https://maven.pkg.github.com/indicio-tech/proven-mobile-sdk")
        credentials {
            username = readLocalProperty("githubUsername")
            password = readLocalProperty("githubToken")
        }
     }
    maven {
        setUrl("https://maven.pkg.github.com/hyperledger/aries-uniffi-wrappers")
        credentials {
            username = readLocalProperty("githubUsername")
            password = readLocalProperty("githubToken")
        }
    }
}
```

{% endstep %}

{% step %}

### Add dependency

Add the following implementation to the project dependencies in the `build.gradle.kts` file.

{% code title="build.gradle.kts" %}

```
```

{% endcode %}

```kotlin
dependencies {
    implementation("tech.indicio:provenmobile-android:1.1")
}
```

{% endstep %}

{% step %}

### AndroidManifest permissions

Make sure your AndroidManifest includes the following permissions.

{% code title="AndroidManifest.xml" %}

```
```

{% endcode %}

```xml
<manifest>
    <uses-permission android:name="android.permission.  READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.  WRITE_EXTERNAL_STORAGE" />
        <!-- For Android 10 (API level 29) and above -->
    <uses-permission android:name="android.permission.  MANAGE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>
```

{% endstep %}
{% endstepper %}

## React Native

### Installation

You will want to add "@proven-mobile/core" and "@proven-mobile/react-native" to your project.

{% stepper %}
{% step %}

### Place package files

Place `proven-mobile-core-v1.1.0.tgz` and `proven-mobile-react-native-v1.1.0.tgz` in a directory parallel to your `package.json`.
{% endstep %}

{% step %}

### Add dependencies to package.json

In `package.json` add them both as dependencies.

{% code title="package.json" %}

```
```

{% endcode %}

```json
"dependencies": {
    "@proven-mobile/react-native": "file:proven-mobile-react-native-v1.1.0.tgz",
    "@proven-mobile/core": "file:proven-mobile-core-v1.1.0.tgz",
}
```

{% endstep %}

{% step %}

### Install packages

Run:

```
```

yarn install

````
{% endstep %}
{% endstepper %}

### Android

{% stepper %}
{% step %}
## Add repositories and confirm minSdkVersion

Add repositories to `android/build.gradle` and confirm `minSdkVersion >= 24`.

{% code title="android/build.gradle" %}
```groovy
buildscript {
    ext {
        minSdkVersion = 24
    }
}    
allprojects{
    repositories{
        maven {
            setUrl("https://maven.pkg.github.com/indicio-tech/proven-mobile-sdk")
            credentials {
                username = readLocalProperty("githubUsername")
                password = readLocalProperty("githubToken")
            }
        }
        maven {
            setUrl("https://maven.pkg.github.com/hyperledger/aries-uniffi-wrappers")
            credentials {
                username = readLocalProperty("githubUsername")
                password = readLocalProperty("githubToken")
            }
        }
    }
}
````

{% endstep %} {% endstepper %}

#### Manually link modules (If they are not getting automatically linked)

Older versions of React Native (0.67.5) may have trouble automatically linking the native modules. If you run into issues we recommend linking the package manually as described below.

{% stepper %} {% step %}

#### iOS: Add pod

Add pod to `ios/Podfile`:

{% code title="ios/Podfile" %}

```diff
target 'ExampleApp' do
    <!-- Other configs -->
+   pod 'rtn-proven-mobile-sdk', :path => '../node_modules/@proven-mobile/react-native'

    target 'ExampleAppTests' do
        <!-- Other configs -->
```

````

Then reinstall pods.

</div>

<div data-gb-custom-block data-tag="step">

### Android: settings.gradle

Add project to `android/settings.gradle`:

<div data-gb-custom-block data-tag="code" data-title='android/settings.gradle'>

```diff
 <!-- Other configs -->
+include ':proven-mobile-react-native'
+project(':proven-mobile-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/@proven-mobile/react-native/android')
````

{% endstep %}
{% endstepper %}

#### Android: app build.gradle

Add module to dependencies in `android/app/build.gradle`:

{% code title="android/app/build.gradle" %}

```diff
dependencies{
    <!-- Other dependencies -->
+    implementation project(":proven-mobile-react-native")
}

// If you have other libraries that use libc++_shared.so or libfbjni.so 
// you may need to add the following to your android configs
android{
    <!-- Other configs -->
+    packagingOptions {
+        pickFirst '**/libc++_shared.so'
+        pickFirst '**/libfbjni.so'
+    }
}
```

{% endcode %}

#### Android: MainApplication.java

Import and link package in `android/app/src/main/java/com/example/MainApplication.java`:

{% code title="MainApplication.java" %}

```diff
+ import com.rtnprovenmobilesdk.ProvenMobilePackage;

public class MainApplication extends Application implements ReactApplication {
    
    private final ReactNativeHost mReactNativeHost =
        new ReactNativeHost(this) {
        @Override
        public boolean getUseDeveloperSupport() {
            return BuildConfig.DEBUG;
        }
        @Override
        protected List<ReactPackage> getPackages() {
        @SuppressWarnings("UnnecessaryLocalVariable")
        List<ReactPackage> packages = new PackageList(this).getPackages();
+       packages.add(new ProvenMobilePackage());
        return packages;
        }
```

{% endcode %}

#### Gradle / tooling upgrades (older RN versions)

Older React Native versions (0.67.5) may need to upgrade their Gradle wrapper to `7.4` (declared in `android/gradle/wrapper/gradle-wrapper.properties`) and upgrade `com.android.tools.build:gradle` (declared in `android/build.gradle`) to `7.3.1`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.indicio.tech/developer/mobile-solutions/mobile-sdk/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.
