VCM App
Code
This project utilizes Aries Framework Javascript (AFJ) and indy-sdk-react-native.
Project State
Platform
VCM currently is built on React Native 0.70.6
As of now VCM targets Android API 30.0.2
iOS targets iOS 13.0+.VCM can only be run on physical devices as of right now.
Install
- React Native Setup:
- React Native installation instructions are documented here.
- (iOS) Install Cocoa Pods
- Clone the VCM repo and install its dependencies:
git clone git@code.vereign.com:ssi/vpw/vcm.git yarn install
- (iOS) iOS specific install:
- Install iOS Pods:
cd ios pod install
- In the /ios directory, open the project workspace file in Xcode. Once the project is open, navigate to the project's Signing & Capabilities tab and apply your personal Apple Developer Account or your organization's team to target VCM
- Adjust the bundle identifier if needed.
- Install iOS Pods:
Configure
In the root directory add an .env
file containing:
MEDIATOR_URL=https://gaiax.vereign.com/mediator?c_i=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9jb25uZWN0aW9ucy8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiMWY0ZjVhN2QtOWNmMi00NjZhLWJjNmItNTczOTMwMDVmNDE3IiwgInJlY2lwaWVudEtleXMiOiBbIkRBc2prQTdZeXZCM3hrc1NtYXRMVDVyM2hqUU4zQnN4R1VKWHhiU3l6RWtIIl0sICJzZXJ2aWNlRW5kcG9pbnQiOiAiaHR0cHM6Ly9nYWlheC52ZXJlaWduLmNvbS9tZWRpYXRvciIsICJsYWJlbCI6ICJNZWRpYXRvciJ9
Run
- Launch the metro bundler:
yarn start
- Open a second terminal and run:
- (Android)
yarn android
- (iOS)
yarn ios
- (iOS) Via Xcode: Choose your physical iOS device as the destination. Click the "Play" button to Build and Run.
- (Android)
Advanced Configuration
Mediator
In order to use VCM, you must have a mediator to use with the app. VCM is configured to use 'Implicit' mediation and requires a mediator that supports the coordinate-mediation protocol.
Troubleshooting
Hot Reloading
Hot reloading may not work correctly with instantiated Agent objects. Reloading (r
) or reopening the app may work. Any changes made to native modules require you to re-run the compile step.
Dependency Issues, Native Module Linking Issues, or Usage Issues
If you end up changing dependencies or structures, you may need to perform the following steps:
Android
rm -rf node_modules
yarn install
Clean the Android build:
cd android
./gradlew clean
cd ..
Start and clean the Metro cache:
yarn start
In your second terminal, you can now run:
yarn android
Building local android apk file in debug mode
Create .env file with environment variables
Run command in root folder of app project
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
Go to path android
and run the command
./gradlew assembleDebug
As a result you will get apk file in ./android/app/build/outputs/apk/[production|development]
How to prepare next application android release
Put correct password for android upload key in the file android/gradle.properties
for MYAPP_UPLOAD_STORE_PASSWORD
and MYAPP_UPLOAD_KEY_PASSWORD
Run command in root folder of app project
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
Go to path android
and run the command
./gradlew bundleRelease
After that you will find app-release.aab
file in ./android/app/build/outputs/bundle/release
folder
Useful commends
./gradlew signingReport
- In order to find out what's wrong with apk signing you can use gradle's signingReport command.
Latest Android version
GDPR
Note
Man in the mid
security concern it will be addressed in Phase II. One of the discussed options is to use TRAIN API