Requirement | Version | Installation Guide |
---|---|---|
nodejs | > v18 | Install nodejs |
circom | Latest | Install circom |
snarkjs | Latest | Install snarkjs |
Requirement | Version | Installation Guide |
---|---|---|
Java | 11 | Install Java or GPT4 guide |
Android Studio | Latest | Install Android Studio |
Android SDK | Latest | Install Android SDK |
Android Ndk | 23.1.7779620 | Install NDK or GPT4 guide |
Requirement | Version | Installation Guide |
---|---|---|
Xcode | Latest | Install Xcode |
cocoapods | Latest | Install cocoapods |
yarn install-app
First, connect your phone to your computer and allow access.
Create the file android/local.properties
with the following content:
sdk.dir=/Users/<your-user-name>/Library/Android/sdk
Launch the react-native server:
yarn start
Press a
to open the app on Android.
To see the Android logs you'll have to use the Android Studio Logcat.
⚠️ To run the app on iOS, you will need a paying Apple Developer account. Free accounts can't run apps that use NFC reading.
Contact us if you need it to contribute.
Open the ios project on Xcode and add your provisionning profile in Targets > ProofOfPassport > Signing and Capabilities
Then, install pods:
cd ios
pod install
And run the app in Xcode.
If you want to modify the circuits, you'll have to adapt a few things.
First, go to the circuit
folder of the monorepo, modify the circuits and build them.
Then, upload the zipped zkeys built at publicly available urls and replace the urls in app/src/utils/zkeyDownload.ts
. Be sure the zkey is named <circuit_name>.zkey
before you zip it, and the zip is then named <circuit_name>.zkey.zip
.
Adapt the inputs you pass in app/src/utils/prover.ts
, and adapt and redeploy the contracts.
Run the common init script:
./scripts/common.sh
Find your android ndk path. It should be something like /Users/<your-user-name>/Library/Android/sdk/ndk/23.1.7779620
Build the android native module:
export ANDROID_NDK="<your-android-ndk-path>"
./scripts/build_android_module.sh
Find your development team id and run:
export DEVELOPMENT_TEAM="<your-development-team-id>"
./scripts/build_ios_module.sh
cd android
./gradlew assembleRelease
The built apk it located at android/app/build/outputs/apk/release/app-release.apk
As explained here, first setup android/app/my-upload-key.keystore
and the private vars in ~/.gradle/gradle.properties
, then run:
npx react-native build-android --mode=release
This builds android/app/build/outputs/bundle/release/app-release.aab
.
Then to test the release on an android phone, delete the previous version of the app and run:
yarn android --mode release
Don't forget to bump versionCode
in android/app/build.gradle
.
In Xcode, go to Product>Archive
then follow the flow.
Don't forget to bump the build number.
If you get something like this:
'std::__1::system_error: open: /proof-of-passport/app: Operation not permitted'
You might want to try this:
watchman watch-del-all
watchman shutdown-server