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

react native cmd+R cmd+D Shake Gesture doesn't work not refreshing #2133

Closed
chunecai opened this issue Jul 27, 2015 · 29 comments
Closed

react native cmd+R cmd+D Shake Gesture doesn't work not refreshing #2133

chunecai opened this issue Jul 27, 2015 · 29 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@chunecai
Copy link

when I edit the js file and hit Cmd-R in the simulator, nothing happens.
It was work fine by yesterday. I don't kown what happened. I try to restart , full install every software.
It doesn't work . My simulator Hardware > Shake Gesture doesn't work too.
I try http://facebook.github.io/react-native/docs/troubleshooting.html#content and #306 methods , not work.
I think does the watchman is not connection in my simulator. How can I fix it ?

xcode - Version 6.4 (6E35b)
simulator - Version 8.4
watchman - 3.3.0
node - 0.12.7

@jaygarcia
Copy link
Contributor

Try command + shift + T. Your keyboard might be disabled.

https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/xcode_help-command_shortcuts/MenuCommands/MenuCommands014.html

JG

:: sent from my mobile device ::

On Jul 27, 2015, at 05:40, chunecai notifications@github.com wrote:

when I edit the js file and hit Cmd-R in the simulator, nothing happens.
It was work fine by yesterday. I don't kown what happened. I try to restart , full install every software.
It doesn't work . My simulator Hardware > Shake Gesture doesn't work too.
I try http://facebook.github.io/react-native/docs/troubleshooting.html#content and #306 methods , not work.
I think does the watchman is not connection in my simulator. How can I fix it ?

xcode - Version 6.4 (6E35b)
simulator - Version 8.4
watchman - 3.3.0
node - 0.12.7


Reply to this email directly or view it on GitHub.

@chunecai
Copy link
Author

@jaygarcia I tried . don't work. All the same. My keyboard could input the word . It connected to the simulator. How can I make sure the watchman was working on the simulator?

@ericvicenti
Copy link
Contributor

Your bundle server might not be running. That server is what should connect to watchman. Does Xcode launch a server in your terminal when you run your app?

Do you see any errors in Xcode or the simulator?

@chunecai
Copy link
Author

@ericvicenti When I run my app, there is no error, in my Xcode or on the simulator. My app was work fine . Just when I modify my js file , hit cmd+R ,the simulator doesn't work,not refreshing. I couldn't see any error. Just not response.

@ericvicenti
Copy link
Contributor

Does the server run? (A terminal window should appear when you press run in Xcode)

@chunecai
Copy link
Author

@ericvicenti yes, ofcourse. The server was running. When I modified the js file , request the index.ios.bundle, At the terminal console i could see the change.

[09:39:13] find dependencies
[09:39:13] find dependencies (66ms)
[09:39:13] transform
[09:39:14] transform (435ms)
[09:39:27] request:/index.ios.bundle
[09:39:27] request:/index.ios.bundle (9ms)

Just not working refreshing in my simulator.

@chunecai
Copy link
Author

@ericvicenti Also I make sure the watchman was working . In my terminal console , i run the command " ps -ef|grep watchman" , I could see the process code .

501 35782 1 0 5:16下午 ?? 0:11.62 /usr/local/bin/watchman --foreground --logfile=/usr/local/Cellar/watchman/3.3.0/var/run/watchman/cici.log --log-level=1 --sockname=/usr/local/Cellar/watchman/3.3.0/var/run/watchman/cici --statefile=/usr/local/Cellar/watchman/3.3.0/var/run/watchman/cici.state
501 38147 33348 0 9:35上午 ttys001 0:00.01 grep watchman

@ide
Copy link
Contributor

ide commented Jul 28, 2015

@chunecai when the simulator is active, can you go to the top menu and choose Hardware -> Shake Gesture? This should pop up a menu with a button that says Reload. If this works for you, then I believe there is a problem with your computer's keyboard configuration.

@chunecai
Copy link
Author

@ide It doesn't work . When I choose Hardware -> Shake Gesture , It was not pop anything .

@chunecai
Copy link
Author

@ide I saw my computer's keyboard configuration , It was right , It was QWERTY keyboard .

@ide
Copy link
Contributor

ide commented Jul 28, 2015

This is very strange... are you running the app in RELEASE mode maybe? The menu is enabled only in DEBUG mode.

@chunecai
Copy link
Author

@ide Think you so much . It was this problem . One day I packaged this app to my iphone . Modified this configuration .
Now cmd+R and cmd+D was working .

fixed:
xcode-->product-->Scheme-->Edit Scheme -->Run -->Build Configuration -->Debug

@jaygarcia @ericvicenti
Thinks every one . Have a good day.

@ide
Copy link
Contributor

ide commented Jul 28, 2015

awesome. #winning

@ide ide closed this as completed Jul 28, 2015
@chunecai
Copy link
Author

Happy coding...

@BigPun86
Copy link

BigPun86 commented Oct 8, 2015

Great!! saved me too :P Thanks to @ide

@hunteredwards
Copy link

@chunecai thank you. You saved me a load of time!

@KamuelaFranco
Copy link

Can this fix please be added to https://facebook.github.io/react-native/docs/troubleshooting.html ? Those list of fixes are very good, and I believe this should be noted as well. Thanks, and Happy New Year everyone.

@MTen
Copy link

MTen commented Jul 29, 2016

This might be a bit stack overflow-ish but I ran into the same problem.

My keyboard was disabled as @jaygarcia mentioned, but for some reason my hotkey is mapped to command + shift + K, not command + shift + T

From the simulator check "Hardware > Keyboard" and make sure "Connect Hardware Keyboard" is enabled.

@tangkunyin
Copy link

@MTen Think you so much.Hava a nice day

@njafei
Copy link

njafei commented May 9, 2017

I just update to RN0.43,and found that command + R work while command + D not work,anyone can help?

check the pod i use, found that I haven't imort 'DevSupport', so I can't use command + D to debug.

@1ak31sha
Copy link

I am also finding that CMD+D does not work while CMD+R does. just upgraded RN from 0.40 to 0.44
it is not an issue with keyboard being enabled, i have checked this. note that i run the project from xcode, starting npm server myself beforehand ("node node_modules/react-native/local-cli/cli.js start"). i do not use react-native run-ios (cmd+d works in this case). i need it to work when running from xcode (brownfield app)

@julienfouilhe
Copy link

julienfouilhe commented May 22, 2017

Adding 'DevSupport' in the subspecs in my Podfile fixed it for me!

  pod 'React', :path => react_path, :subspecs => [
    'Core',
    'RCTText',
    'RCTImage',
    'RCTWebSocket',
    'RCTNetwork',
    'DevSupport'
  ]

cc @kpogz

@jaimeagudo
Copy link

It sadly doesn't work for me on 0.44 @julienfouilhe, I am pretty sure my scheme is on debug, I ran pod install and I have reset all the caches

Any clues?

Version 10.0 (SimulatorApp-745.10 CoreSimulator-375.21)

@ChachiQ
Copy link

ChachiQ commented Jun 14, 2017

my version is 0.45, and config pod like below can fix this issue

pod 'React', :path => './ReactNative/node_modules/react-native', :subspecs => [
'Core',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'BatchedBridge',
'DevSupport',
]
pod "Yoga", :path => "./ReactNative/node_modules/react-native/ReactCommon/yoga"

post_install do |installer|

installer.pods_project.targets.each do |target|
if target.name == 'React'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['RCT_DEBUG=1','RCT_DEV=1','RCT_NSASSERT=1']
end
end
end
end
end

@renatomcamilio
Copy link

@julienfouilhe you saved the day -- have been looking for this for weeks. 🙏

@julienfouilhe
Copy link

@renatomcamilio Credits actually go to @njafei, got the answer from him two messages above mine ;)

paweldomas added a commit to jitsi/jitsi-meet that referenced this issue Oct 25, 2017
Without this the dev menu will not appear, after the shake gesture.
I don't know if we need that, but here there are also some flags that
are adjusted in the solution proposed here:
facebook/react-native#2133
Note that those flags are not required for the dev menu to work, so I've
skipped them.
paweldomas added a commit to jitsi/jitsi-meet that referenced this issue Oct 26, 2017
include DevSupport

Without this the dev menu will not appear, after the shake gesture.
I don't know if we need that, but here there are also some flags that
are adjusted in the solution proposed here:
facebook/react-native#2133
Note that those flags are not required for the dev menu to work, so I've
skipped them.
paweldomas added a commit to jitsi/jitsi-meet that referenced this issue Oct 31, 2017
include DevSupport

Without this the dev menu will not appear, after the shake gesture.
I don't know if we need that, but here there are also some flags that
are adjusted in the solution proposed here:
facebook/react-native#2133
Note that those flags are not required for the dev menu to work, so I've
skipped them.
saghul pushed a commit to jitsi/jitsi-meet that referenced this issue Nov 2, 2017
include DevSupport

Without this the dev menu will not appear, after the shake gesture.
I don't know if we need that, but here there are also some flags that
are adjusted in the solution proposed here:
facebook/react-native#2133
Note that those flags are not required for the dev menu to work, so I've
skipped them.
@hussamkurd
Copy link

in the emulator "Hardware" -> "Erase All Contents and Settings" , and rebuild the version work for me

@okerivy
Copy link

okerivy commented Mar 8, 2018

🙃in the emulator "Hardware" -> "Restart" , it work for me
iphone6 -- 11.2

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests