react-native
react-native copied to clipboard
Command (⌘)-R is now recording the simulator in addition to reloading JS (Xcode 12.5)
Description
Looks like the CMD-R mapping is taken now in XCode 12.5:
React Native version:
N/A.
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Open simulator in XCode 12.5
- Press CMD-R to reload JS, the simulator will start recording the screen
I did not find a way to prevent this. Should we map reloading JS to different keys?
Double R 👍
@dulmandakh It'll record the screen then reload the JS 😢
Just Double R, no command key
Double R doesn't work on iOS simulator, I think that only works for Android. As a workaround for now I'm just using CMD+D to open the dev menu and reload it that way
Hey @dulmandakh ! Double R does not work on iOS simulator. And even if you could... When you were focus in some TextInput, that wouldn't work I guess.
As an alternative:
- R key in the terminal running the packager
- CMD+D and Reload as @ernestasgobionis suggested
But I am hoping we can map another CMD+ something in the simulator because I am recording ALL THE TIME by mistake 😂 .
This is my work around: https://twitter.com/jonstuebe/status/1390384513927184385
Nice! Thank you @jonstuebe !
How to remapping simulator screen record shortcut
First, open system preferences and open the Keyboard area.
Next:
- Click on Shortcuts
- Click App Shortcuts
- Click the plus button
- Select Other
- Shift + Cmd + G
- Enter in /Applications/Xcode.app/Contents/Developer/Applications/
- Select Simulator App
- Enter for Menu Title: "Record Screen"
- Click into the keyboard shortcut box and press your desired shortcut (Ex: Cmd + Shift + R)
Source: https://twitter.com/jonstuebe/status/1390384513927184385 Thanks @jonstuebe
Thanks @jonstuebe Works for me
Thanks @jonstuebe
That stops the whole command + R from recording for me, but I still can't refresh with command + R
@JeffreyLeeDave, not exactly the same, but I added a shortcut on "command + R" to "Shake" the phone (so it opens the menu)
Short Answer:
We can remap simulator screen record shortcut following the steps below:
- Open Simulator
- Right click the icon in the tray
- Select Options > Show in Finder
- Copy Simulator.app to your /Applications directory
- Open System Preferences > Keyboard > Shortcuts
- Click App Shortcuts > add [+]
- Select the Simulator.app from the list
- Enter Menu Title
Record Screen
(or other name of the Simulator's Shortcut) - Enter Keyboard Shortcut whatever you want
- Click Add
- Delete Simulator.app from /Applications
- Done! The shortcut will still be changeable.
While workarounds are nice this is still a valid issue. So I hope the reload keyboard shortcut will be change in upcoming react native versions?
Here's a simpler workaround, i perused the packager source and realized that there are some commands you can send to the bundler via a simple curl request. curl localhost:8081/reload
will reload react native.
single R keystroke reloads
@jonstuebe since Elon broke Twitter, non-users (including me) cannot see your actual solution 😢 Could you please share it here? :)
@dnlgrgly it's the instructions in the comment two posts below Jon's: https://github.com/facebook/react-native/issues/31467#issuecomment-835352650
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.