Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Setup Local environment

patogallaiovlabs edited this page Apr 12, 2021 · 2 revisions

Local UI to local server

UI

.env file

Specify variables

  • SERVER_URL - i.e. http://localhost:1338/v1
  • RWALLET_ENV - when RWALLET_ENV is empty, the final server URL will match SERVER_URL value. So just leave it empty.
  • RWALLET_API_KEY - if running the server against dev DB, this value should be 2d213e2c-fb63-4f94-b990-939a18e7d123.

Switching environments

When switching environments, app needs to be uninstalled to clear the local storage, until ui issue #647 is done.

Reflect .env file changes

This file listen to changes on config.js file to be reloaded. So upon any changes, modify the config.js file to apply them. (Could be just adding an empty line or space).

iOS

To allow http requests during development, add the following under <key>NSAppTransportSecurity</key> prop on ios/rwallet/Info.plist file:

...
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
...
</dict>
...

Android

Add android:usesCleartextTraffic="true"  to the <application node that starts on line 16 of the file android/app/src/main/AndroidManifest.xml to allow http communication between the app and your localserver. You can add it at the end, after the android:theme property, for example.

If you are using a real device (not a emulator) the SERVER_URL needs to be changed to http://10.0.2.2:1338/ , as ‘localhost’ will refer to the device.