Request or download the MATTR Pi SDK Trial License Agreement and the MATTR Customer Agreement and review these terms.
Technology | Version |
---|---|
Xcode | 16.2 or higher |
iOS | 15(*) or higher |
iPhone | iPhone 6S or higher |
Technology | Version |
---|---|
Android Gradle Plugin | 8.3.0 |
Gradle | 8.3 |
Kotlin | 1.9.0 |
JDK | 17 |
Android min API level | 24 |
Android target API level | 34 |
Technology | Version |
---|---|
Node | v18 or higher |
React Native | 0.73.x, 0.77.x, 0.78.x and 0.79.x |
The SDK was tested with react-native 0.73.10.
Refer to our SDK Docs landing page for step-by-step instructions to gain access to any of our SDKs.
Please reach out in case you need any assistance.
yarn add @mattrglobal/mobile-credential-holder-react-native
Linking the package manually is not required from React Native 0.60 and higher that supports Autolinking.
Install the pods (via Cocoapods) to complete the linking.
npx pod-install ios
The precompiled MATTR Mobile Credential Holder Android Native SDK is provided in the published NPM package.
To bundle the native libraries, append the following changes to the android/build.gradle
script:
allprojects {
repositories {
…
google()
+ maven {
+ url = "$rootDir/../node_modules/@mattrglobal/mobile-credential-holder-react-native/android/frameworks"
+ }
}
}
Add the following manifest placeholders to your app's build.gradle
file:
android {
defaultConfig {
// Add the next line
manifestPlaceholders = [mattrDomain: "credentials", mattrScheme: "io.mattrlabs.sample.mobilecredentialtutorialholderapp"]
}
...
}
This configuration allows your Android app to receive authentication results from the browser. The specified values are used to construct the URI that the SDK will use to redirect the user back to your app after they complete authentication with the issuer:
mattrScheme
: Can be any path that is handled by your application and registered with the issuer.mattrDomain
: Can be any path, however our best practice recommendation is to configure this to be credentials
, as the standard format for the redirect URI is {redirect.scheme}://credentials/callback
.The combination of these values ({mattrScheme}://{mattrDomain}/*
) must exactly match a redirect URI that has been whitelisted for the OAuth client used to authenticate the holder. This is required for the SDK to successfully retrieve credentials.
This SDK can be used alongside the mDocs Verifier SDK (mobile-credential-verifier-react-native
) within a single app. To ensure compatibility, always use the latest version of both SDKs. If you're using different version combinations, please contact us to confirm compatibility.
When combining both SDKs in the same application, add the following activity to your app's android manifest:
<application>
...
+ <activity
+ android:name="global.mattr.mobilecredential.common.webcallback.WebCallbackActivity"
+ android:exported="true"
+ android:label="@string/web_callback_activity_label"
+ android:launchMode="singleTask" >
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <data android:scheme="${mattrScheme}"
+ android:host="${mattrDomain}" />
+ </intent-filter>
+ </activity>
...
</application>
First GA release as a standalone SDK.
Previous versions of this SDK were only available as an extension. For a detailed list of previous changes to this SDK please refer to the React Native Holder SDK changelog under the Mobile Credential category.
Generated using TypeDoc