简体   繁体   English

React-Native在iOS设备上启用热重载

[英]React-Native enable hot reload on iOS device

I would like enable hot reload on my iOS device. 我想在我的iOS设备上启用热重装。 I've only reload , Debug JS Remotely , Toggle Inspector , Show Perf Monitor , Cancel . 我只重新加载远程调试JS切换检查器显示性能监控器取消

Do you know if i can enable hot/live reload ? 您知道我是否可以启用热/实时重新加载吗?

I've edit my AppDelegate.m and add my ip, but no result. 我已经编辑了AppDelegate.m并添加了IP,但是没有结果。

If i push Debug Remotely , the device search localhost :/ 如果我按“ 远程调试” ,设备将搜索localhost:/

Anyone can help me? 有人可以帮助我吗?

I've noticed that the failure to connect to the packager on the host machine fails silently in newer versions of React Native. 我已经注意到,在较新版本的React Native中,无法连接到主机上的打包程序的失败失败。 This tends to occur when the host machine and the physical device are connected to different WLANs. 当主机和物理设备连接到不同的WLAN时,往往会发生这种情况。 The developer menu only shows the options listed in your question in those cases. 在这种情况下,开发人员菜单仅显示问题中列出的选项。 The described behaviour occurs at least on RN v0.50.4 and with the following declaration in AppDelegate.m : 至少在RN v0.50.4上并且在AppDelegate.m具有以下声明时,会发生上述行为:

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil];

The device uses a pre-bundled file in those circumstances. 在这种情况下,设备将使用预捆绑的文件。


TL;DR confirm that the iOS device is connected to the same wireless network as the host machine. TL; DR确认iOS设备已与主机连接到同一无线网络。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM