[native] Add 'natDevHostname' field to Expo config
Summary:
- Created the app.config.js, which is a dynamic version of app.json - you can read more about them in the official guide. The file is evaluated when running yarn dev in native.
- Added the natDevHostname field to the "extra" config
- The field is supplied with local machine IP address
Depends on D6266
Test Plan:
Open native yarn dev and run app (either physical device or simulator).
The following should work:
// in native app (e.g. in `root.react.js`) import Constants from 'expo-constants'; console.log(Constants.expoConfig.extra.natDevHostname);
Ensured it displays local LAN IP of my MacBook.
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D6267