This guide will show you how to integrate DapiSDK for React-Native and use its components to interact with the API.
Dapi for React-Native is a prebuilt SDK that reduces the time it takes to integrate with Dapi's API and gain access to your users financial data.
The SDK provides direct access to Dapi endpoints and offers optional UI to manage users' accounts and money transfer.
You can check out our React-Native Integration Guide for detailed information about our SDK.
- Download and install Node, Android Studio, Xcode, VSCode.
- Clone the project
git clone https://github.com/dapi-co/DapiSDK-ReactNative.git
- Run
yarn
to install dependencies - Open the project in VSCode and navigate to
screens/home.tsx
and replaceAPP_KEY
with your appKey. Can be obtained from Dapi Dashboard - Android:
- Open
android
project folder in Android Studio and go toSettings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK
and select JDK 17 if not selected. - Open
build.gradle
and replace applicationId valuecom.dapi.app
with your Bundle ID. - Sync gradle
- Open
- iOS:
- In your terminal, go to
ios
folder and runpod install
. - Open the
ios
project folder on Xcode. - In the Project Navigator, select the project file -> General -> Identity then replace Bundle Identifier value
com.dapi.app
with your Bundle ID
- In your terminal, go to
- Run the app from the IDE or run command
npx react-native run-android
to run Android ornpx react-native run-ios
to run iOS. - DapiSDK will start successfully with the correct
AppKey
andBundleID
. - Click
Connect
to select your bank and enter credentials to login through Dapi. You can create a sandbox bank account to login in the Sandbox environment. - After a successful connection, a DapiConnection object is generated and used for making calls to Dapi endpoints that you can call by clicking on any of the buttons like
Get Identity
andCreate Transfer
.