This repository was archived by the owner on Oct 12, 2023. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 21
Getting Started
        patogallaiovlabs edited this page Jun 28, 2021 
        ·
        11 revisions
      
    These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- 
npm installto install dependencies (ornpm i).- If you are using Windows, use npm run install:windowsto install and fix the broken metro-config blacklist.js file.
 
- If you are using Windows, use 
- 
Create an environment variable file named .envin the root directory# Parse server configuration # Server URL https://rwallet.app/v1 # Devbox Server URL for Android Simulator http://10.0.2.2:1338/parse # Devbox Server URL for iOS Simulator http://<YOUR_IP_ADDRESS>:1338/parse # RWALLET_ENV: Production, Dogfood or others. If RWALLET_ENV value is "Production", or not set, the final server URL value is the same as Server URL such as "https://rwallet.app/v1"; otherwise, the RWALLET_ENV value will be prepended to Server URL in lower case as a sub-domain. For example, if RWALLET_ENV is "Dogfood" and Server URL is "https://rwallet.app/v1", the final URL is https://dogfood.rwallet.app/v1. PARSE_SERVER_URL=https://rwallet.app/v1 RWALLET_API_KEY=6a740128-2ba2-4b82-9301-8cbe07208ee9 RWALLET_ENV=Dogfood- If .env file is changed, manually edit the file importing react-native-dotenv (rwallet/config.js) by either adding an empty line or whitespace will work.
- For security, we force the use of https to transfer data. If you use http during development, you need to set NSAllowsArbitraryLoads to true in the iOS environment and useCleartextTraffic to true in the Android environment.
- 
Note: There are 2 examples for Dogfood (.env_dogfood) and Local (.env_local) environments for easy configuration. Copy the files to.envfor a quick change of environments.
 
- If .env file is changed, manually edit the file importing react-native-dotenv (
- 
In order to use firebase messaging on Android/iOS: - Add google-services.jsonfile to Android:./android/app/.
- Add GoogleService-Info.plistfile to iOS:./ios/rwallet/.
 
- Add 
- 
(for iOS only) npm run podinstall: will install all pods fromios/Podfile
- 
npm run androidornpm run ios. The script will first start server daemon in a separate terminal window, the same effect asnpm run start. You should see console output like below.> [email protected] start /Users/mikasa/Documents/repos/rwallet > node node_modules/react-native/local-cli/cli.js start ┌──────────────────────────────────────────────────────────────────────────────┐ │ │ │ Running Metro Bundler on port 8081. │ │ │ │ Keep Metro running while developing on any JS projects. Feel free to │ │ close this tab and run your own Metro instance if you prefer. │ │ │ │ https://github.com/facebook/react-native │ │ │ └──────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in /Users/mikasa/Documents/repos/rwallet Loading dependency graph, done.- For Android, npm run androidwill start the app in your physical device or Android virtual device. You need to check what device are available by runningadb devicesin terminal. To test the app in a physical Android device, you need to make sure Developer Options -> Enable Debugging via USB is turned on for that device. Note: If you encounter an error like below then you need to create a local.properties file under ./android and add one linesdk.dir = /Users/<username>/Library/Android/sdkin it.SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/<usernmae>/Documents/repos/rwallet/android/local.properties'.
- For iOS device, npm run ioswill start the App in iOS physical or virtual device.
 
- For Android, 
- 
Hot reload code change - Press Command + m on virtual device and select Enable Hot Reloadingto hot reload file changes.