-
Notifications
You must be signed in to change notification settings - Fork 36
Development setup
Smartwallet app is written in React Native. The development process requires installing appropriate SDK (either for Android or iOS) and using a phone emulator or a mobile phone.
There are two modes of building the app - development and production mode. After wrapping up an issue, you should check if your changes don't break the production build.
Prerequisites:
After cloning the smartwallet-app repository to a directory on your computer, enter the directory and run the following command:
yarn install
Please set up an Android development environment as described in React Native documentation.
Then:
yarn android
react-native run-android
The first command will start the Haul bundler and serve the build on your device if both are running on the same network. The second command will run and install a debug build on an attached Android device.
Please set up the XCode development environment according to React Native docs.
Then:
yarn ios
react-native run-ios --device
The first command will start the Haul bundler and serve the build on your device if both are running on the same network. If remote debugging is enabled, the debugger-ui will also be available here. The second command run and install a debug build on an attached iOS device.
haul bundle --platform ios --bundle-output ios/main.jsbundle --assets-dest ios
Then open ios/smartwallet/AppDelegate.m
and switch jsCodeLocation
to be production build (comment out the development one).
Testing uses Jest. The following script enables watch and testing coverage display as well.
yarn test --watch --coverage