React Native 代码热加载 [英] React Native code hot load

查看:35
本文介绍了React Native 代码热加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

App Store 禁止下载远程代码,WebKit + JS 除外:

App store prohibits downloading remote code with the sole exception of WebKit + JS:

3.3.2 应用程序不得下载或安装可执行代码.解释代码只能在应用程序中使用,如果所有脚本,代码和解释器打包在应用程序中,而不是下载.上述唯一的例外是脚本和代码由 Apple 的内置 WebKit 框架下载并运行,前提是此类脚本和代码不会改变通过提供特性或功能的应用程序不符合预期和宣传的目的提交到 App Store 的应用程序.

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 实现来修复错误吗?

Does this adhere to React Native? Can I host my React Native script bundle on a CDN server and fix bugs by replacing my JS implementation?

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

推荐答案

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

Yes, you are allowed to hot load JS into your iOS app. This is one of the big advantages of React Native.

这篇关于React Native 代码热加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆