Use metro message endpoint to dispatch dev menu request #598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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