HomePhabricator
Diffusion Comm 07f99eacd35c

[native] Patch @expo/cli to support debug-only scheme

Description

[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:

Screenshot 2023-01-21 at 18.31.24.png (206×640 px, 68 KB)

Depends on D6319, D6320

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

Details

Provenance
bartekAuthored on Jan 21 2023, 9:11 AM
Reviewer
ashoat
Differential Revision
D6328: [native] Patch @expo/cli to support debug-only scheme
Parents
rCOMMafb9582081b9: [native] Add URI scheme to debug AndroidManifest.xml
Branches
Unknown
Tags
Unknown