React Native 代码热加载

React Native code hot load

应用商店禁止下载远程代码,WebKit + JS除外:

3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.

这符合 React Native 吗?我可以在 CDN 服务器上托管我的 React Native 脚本包并通过替换我的 JS 实现来修复错误吗?

参见:https://facebook.github.io/react-native/docs/embedded-app.html#add-rctrootview-to-container-view

是的,您可以将 JS 热加载到您的 iOS 应用程序中。这是 React Native 的一大优势。