Get Started

digi.me React-Native demo Quick Start Guide

Get sample projects up and running quickly using Typescript and native digi.me SDKs.
Once you've obtained your app id from us, you're just a few steps from getting started.

Prerequisites

• Node JS
• Yarn package manager
• ImageMagicK
• Cocoapods - (for iOS apps)
• Java Development Kit - (for Android apps)
• Android Studio - (for Android apps)

1. Clone app with SDK

• https://github.com/digime/digime-react-native-demo.git

2. Install required dependencies

In the terminal, run: `yarn`

3. Configure the app

Set your given app id and p12 password in the constants file (./src/constants/Constants.ts).

4. Build and set native project variables

In the terminal, run: `yarn compile` then `yarn configure-native`

5. Run on your device!

In the terminal, run: `yarn run-android` or `yarn run-ios`

6. Make it your own!

Explore the code! Use the sample app as base or start a new project. For more information check out our React-Native SDK documentation..

digi.me Android Quick Start Guide

Get sample projects up and running quickly! The sample project included with the SDK is pre-configured and ready to be compiled and run with little configuration required. Please contact us first to obtain credentials for your application.

Min Requirements

• JDK 1.8.181+
• Android Studio 3.2.0+. Please try to use only the production builds avoiding preview builds such as Canary or Beta as these may have features that aren't yet supported in the digi.me Android SDK or the example app project
• Development environment to support Android API 21+
• Any Android device with Android 5.0 and above
• digi.me and a library installed on the Android device

New to Android?

Please see the Android developer guide for help on building apps and other resources.

Get started with the example app

1. Clone the example app with the SDK

Download digi.me SDK with a few example apps to try. The digi.me SDK code repository is stored under GitHub where you can find always the most recent version of SDK with the latest bug fixes and an up to date compatible example app. Clone the repository to your machine to get the SDK and the example apps. Run the following command in the terminal;

git clone https://github.com/digime/digime-android-sdk.git

2. Import project into Android Studio

a. From Android Studio, select "Import Project". This can be found on the window displayed for new projects (as shown below). Or, alternatively, by selecting `File` > `New` > `Import Project...` from Android Studio.

b. Navigate to the cloned project directory, select the repository folder, then click 'ok' to start importing the project to Android Studio

c. Allow the project to complete importing. If shown, please dismiss any prompts to upgrade Gradle for the example app as this may cause compatibility issues.

3. Configure the example app

A demo contract ID and p12 file have already been embedded in the example app for ease of use. The contract selects both Social and Finance data from a digi.me library for a given time period (please contact us if you would like to use a different contract). Add your application ID and p12 password in the build.grade file (digime-android-sdk/examples/consent-access/build.gradle) as shown from the placeholders below:

defaultConfig {
	applicationId "me.digi.examples.ca"
	minSdkVersion buildConfig.minSdk
	targetSdkVersion buildConfig.targetSdk
	versionCode 1
	versionName "1.0"

	/*
	 * Consent Access Configuration parameters:
	 * The following lines set parameters necessary for initialization and usage of the CA API (through SDK):
	 * App ID, Contract ID, Private Key file and Private Key file password if any;
	 * These are helper resource constructors which get injected into AndroidManifest.xml
	 * For further details how these are mapped to meta-data used by the SDK, look at AndroidManifest.xml at the section marked with 
	 */

	resValue "string", "APP_ID", 
"your_real_app_id"
// <- sample: "gDdQfubl66rj07webI92m4afPL9va9Z1" (32 characters hex string given by digi.me support) resValue "string", "P12_KEYSTORE_PASSWORD",
"your_real_key_password"
// <- sample: "20ov;p-1Fi3oL" (the password that goes with your private key). You will need to request the key password from dev support if using pre-set contract ID. resValue "string", "CONTRACT_ID", "gzqYsbQ1V1XROWjmqiFLcH2AF1jvcKcg" // <- demo contract ID for testing purposes resValue "string", "P12_KEYSTORE_FILENAME", "CA_RSA_PRIVATE_KEY.p12" // <- demo private key in assets folder, accompanying the demo contract ID }

4. Build and run

Run the example app then create a digi.me library to use with CA. Ensure that the 'consent-access' sub project is selected, then with an Android device plugged in, click the 'Run' or 'Debug' icon to start

5. Make it your own

Explore the code! Use the sample app as a base or start a new project using the SDK. For more information about the SDK or how to integrate the SDK into an existing or new project, please check out our GitHub Android SDK documentation.

digi.me iOS Quick Start Guide

Get sample projects up and running quickly!

Once you've obtained your app id and password from us, you're just a few steps from getting started.

Min requirements

• iOS 10
• XCode 9 or higher
• Swift 3.2
• iPhone 5, iPad (4th generation), or iPad mini (2nd generation)
• Registered Apple developer account

1. Clone app with SDK

• https://github.com/digime/digime-sdk-ios

2. Configure the app

Set your given app id and p12 password in /Example/ViewController.m

Set your app id for CFBundleURLSchemes in /Example/DigiMeFramework/info.plist

3. Build and run on your device

Run the example app then create a digi.me library to use with CA.

4. Make it your own!

Explore the code! Use the sample app as base or start a new project using the SDK.
For more information on the iOS digi.me SDK, and the example app, please check out our iOS SDK documentation