Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use metro message endpoint to dispatch dev menu request #598

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

kmagiera
Copy link
Member

@kmagiera kmagiera commented Oct 9, 2024

This PR uses a different method for opening dev menu.

Previously we'd call native dev menu module, which was causing problems, specifically in expo-go where the module resolution was resulting in bundle error. Since it turned out to be easier to use the standard method that metro uses for triggering the menu than to debug the old method, I decided to rework the underlying implementation.

Now, we use metro /message endpoint that is used to proxy messages between dev tools and device. One of the messages is "devMenu" which opens the dev menu on the device side (which is what we wanted).

This PR also removes old code which was placed in the wrapper, but also for android we were using a different method that was relying on adb. The new method works on both devices, hence we don't need separate implementation and can delete both of them.

Test plan

  1. Use dev menu option on Android and iOS across all configurations we have in the repo (expo-go, react-native-75, expo-51 etc)

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 10:26am

@kmagiera kmagiera merged commit 0c01e8a into main Oct 9, 2024
3 checks passed
@kmagiera kmagiera deleted the kmagiera/dev-menu branch October 9, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants