Changeset View
Changeset View
Standalone View
Standalone View
docs/dev_environment.md
Show First 20 Lines • Show All 767 Lines • ▼ Show 20 Lines | - As long as you’re deploying a debug build, this strategy should work for you. You can create a `network.json` file in `native/facts` that will override the default. | ||||
} | } | ||||
``` | ``` | ||||
You’ll need to delete and reinstall the app for changes to `native/facts/network.json` to take effect, as the default production URL is persisted in Redux. | You’ll need to delete and reinstall the app for changes to `native/facts/network.json` to take effect, as the default production URL is persisted in Redux. | ||||
- If you’re deploying a release build, the above strategy won’t work. Your best bet to override the server URL is to get to the secret “Developer tools” menu option in the app. | - If you’re deploying a release build, the above strategy won’t work. Your best bet to override the server URL is to get to the secret “Developer tools” menu option in the app. | ||||
1. You may need to use a real production account for this, since the server address will default to the production server if this is the first build you’ve deployed to the target device. | 1. You may need to use a real production account for this, since the server address will default to the production server if this is the first build you’ve deployed to the target device. | ||||
2. Next, in order for the “Developer tools” menu option to appear, you’ll need to add your user ID to [the list of user IDs in `staff.json`](https://github.com/CommE2E/comm/blob/master/lib/facts/staff.json). A good way to figure out your user ID is to use the Chrome Redux debugger to inspect the `currentUserInfo` property when logged into the web app. | 2. Next, in order for the “Developer tools” menu option to appear, you’ll need to add your user ID to [the list of user IDs in `staff.js`](https://github.com/CommE2E/comm/blob/master/lib/facts/staff.js). A good way to figure out your user ID is to use the Chrome Redux debugger to inspect the `currentUserInfo` property when logged into the web app. | ||||
3. Finally, you should be able to navigate to Profile → Developer tools in the app and set the address of the local server. It should look something like this: | 3. Finally, you should be able to navigate to Profile → Developer tools in the app and set the address of the local server. It should look something like this: | ||||
``` | ``` | ||||
http://w.x.y.z/comm | http://w.x.y.z/comm | ||||
``` | ``` | ||||
Where `w.x.y.z` is the local IP address you found earlier. | Where `w.x.y.z` is the local IP address you found earlier. | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |