This project is deprecated and therefore not maintained anymore. The live repository of the IRMA app is now at github.com/privacybydesign/irmamobile (without underscore).
IRMA offers a privacy-friendly, flexible and secure solution to many authentication problems, putting the user in full control over his/her data.
The IRMA app manages the user's IRMA attributes: receiving new attributes, selectively disclosing them to others, and attaching them to signed statements. These attributes can be relevant properties, such as: "I am over 18", "my name is ..." and "I am entitled to access ....". They are only stored on the user's device and nowhere else.
Follow the steps for "Installing dependencies" for "Building Projects with Native Code" (not the "Quick Start"):
react-native-cli
)yarn.lock
): https://yarnpkg.com/en/docs/install$ANDROID_HOME
is properly set for your current and future shellsInstall the Go toolchain and Dep package manager:
Install and init gomobile:
go get golang.org/x/mobile/cmd/gomobile
gomobile init
gomobile init
should automatically pickup the Android NDK if it is installed through the SDK Manager and $ANDROID_HOME
is set. Otherwise you need to use the -ndk
option.Clone this project so it is located inside your $GOPATH
:
go get github.com/privacybydesign/irma_mobile
should do the trickno Go code
warning; we fetch the dependencies of the irmagobridge
subpackage via Dep.Install Javascript dependencies using Yarn or NPM, and vendor Go dependencies:
cd $GOPATH/src/github.com/privacybydesign/irma_mobile
yarn install
dep ensure
Connect your phone with a cable, or use a simulator
yarn run react-native run-ios --help
for more options.adb devices
yarn run react-native run-android --help
for more options.Build and run the app for development:
yarn run ios
or
yarn run android
If Javascript compilation fails with an error that some source cannot be resolved or located (i.e. cannot resolve 'lib/...', 'store/...'), it often helps to clear the Babel build cache with yarn start --reset-cache
. You may need to kill old Node server (killall node
) if you get a port binding error.
If you get the following error during compilation of the go bridge on Go 1.10, package gobind: cannot find package "gobind" in any of" by upgrade go and gomobile
, try to upgrade gomobile to the latest version and run gomobile init
again (see gomobile issue 108336).
If you get this error during compilation of the go bridge for Android:
seq_android.c:213:3: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
seq_android.c:213:3: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
Then you have a too new version of the Android NDK (>=r16), see here: https://github.com/golang/go/issues/22766
You can workaround this by including string.h
in the following file: $GOPATH/src/golang.org/x/mobile/bind/java/seq_android.c.support
If you get this error during running on Android in debug mode:
adb server version (36) doesn't match this client (39); killing...
Then try adb reconnect
If your iOS build seems to fail with error: An organization slug is required (provide with --org)
, this actually isn't a fatal error and IRMA.app will be successfully installed to your device. The error is due to a sentry.properties
file which isn't necessary in development. This should be fixed to not be a failure in development.
If running gomobile init
gives the error:
gomobile: /usr/local/go/bin/go install golang.org/x/mobile/cmd/gobind failed: exit status 1
../src/golang.org/x/mobile/internal/importers/ast.go:37:2: cannot find package "golang.org/x/tools/go/packages" in any of:
Install the following package: go get golang.org/x/tools/go/packages
.
We use BrowserStack to test on actual devices: