[native] Patch @expo/cli to support debug-only scheme
Summary:
Following up https://phab.comm.dev/D6320#189520
Decided to patch Expo CLI, because:
- this gives more flexibility - works in every scenario, no need to remember that some commands don't support --scheme flag (e.g. expo run)
- restores behavior that Expo should have from the beginning.
This patch should be maintainable, I added comments to each patched snippet. If it ever fails, we can always fall back to using --scheme flag in yarn dev. I also linked the discussion in expo/expo repo that describes this patch in-depth.
Also, because now the URL under the QR code is a deep link, it became less readable, so the local dev IP is displayed explicitly in addition to the deep link:
Test Plan:
Note: The EXPO_DEBUG=1 env var displays additional info, in some scenarios it gives more insight what's going on under the hood
Run EXPO_DEBUG=1 yarn dev.
You should see the following lines somewhere at the beginning:
expo:utils:scheme ios application Info.plist path: Comm/Info.debug.plist +0ms expo:utils:scheme ios application schemes: [ 'comm' ] +4ms expo:utils:scheme android application schemes: [ 'comm' ] +18ms
Additional things that can be checked:
- Both URLs should be displayed under the QR code
- When app is built on this branch, the QR code should be scannable (this one applies more to parent diffs' test plan, though)
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D6328