React Native development menu freezing in iOS emul

2020-07-06 01:42发布

From yesterday I started getting this issue in iOS emulator:

When I hit cmd+D in iOS emulator to bring up development menu, App becomes unresponsive for ~30 sec. Then when I select something (Debug in chrome for example). Menu is gone, but app is unresponsive for another 30 sec or so.

This happens with apps that are just created: react-native init testapp

In android emulator it works just fine.

Video sample (I am trying to click on menu item and then on count button every second or so): https://www.youtube.com/watch?v=O7YIGeQK9lk

Code here: https://github.com/juozapas/reactsampleapp

$ react-native --version react-native-cli: 0.1.10 react-native: 0.19.0

2条回答
smile是对你的礼貌
2楼-- · 2020-07-06 02:31

In case you are having trouble with emulators, you can at first use a physical iOS device to circumvent the issue. The react native menu does not freeze there (tested).

Periodical freezing of the screen can happen if you are using apps that use accessibility features, like e.g. BetterTouchTool or SizeUp with Xcode versions 7.0 and 7.1 and the issue should be resolved in Xcode 7.2 beta as discussed here.

If that doesn't help, try disabling Slow Animations as described in the accepted answer.

查看更多
地球回转人心会变
3楼-- · 2020-07-06 02:37

Looking at your video, it seems that you have enabled the Slow animations debugging mode in the iOS Simulator, perhaps by accidentally pressing Cmd + T.

Try turning off the slowed animations under the Debug > Slow Animations menu or by pressing Cmd + T again.

I am not sure of the root cause of the unresponsiveness, but it is perhaps due to the native Action Sheet component animating out on the button press before the control is returned to the application.

查看更多
登录 后发表回答