Installation
iOS
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.
Official documentation for reading values from the local.properties can be found here.
Android Installation
Add repositories
Add the below repos to your Android repository list.
// 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")
}
}
}AndroidManifest permissions
Make sure your AndroidManifest includes the following permissions.
<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.
Install packages
Run:
yarn install
{% 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" %}
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?