Installation

iOS

1

Open your project in Xcode

Open your iOS project in Xcode and click on your project name under the targets section.

2

Locate frameworks

Scroll down in the General tab until you see the Frameworks section of the project.

3

Add the SDK

Click on the + button under Frameworks.

4

Select the XCFramework

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

Android

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.

Official documentation for reading values from the local.properties can be found here.

Android Installation

1

Add repositories

Add the below repos to your Android repository list.

build.gradle.kts
// 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")
        }
    }
}
2

Add dependency

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

build.gradle.kts
dependencies {
    implementation("tech.indicio:provenmobile-android:1.1")
}
3

AndroidManifest permissions

Make sure your AndroidManifest includes the following permissions.

AndroidManifest.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>

React Native

Installation

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

1

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.

2

Add dependencies to package.json

In package.json add them both as dependencies.

3

Install packages

Run:

yarn install

{% endstep %} {% endstepper %}

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" %}

Android: app build.gradle

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

Android: MainApplication.java

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

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.

Last updated

Was this helpful?