如何在 React Native 中离线捆绑 iOS? [英] How to get offline bundling of iOS in React Native?
问题描述
谁能解释一下如何从反应本机"代码生成离线的 iOS 应用程序包?
Anyone could you please explain how to generate offline bundle of iOS application from 'react native' code?
我已经尝试过https://stackoverflow.com/questions/41970435/how-to-generate-ipa-file-for-react-native"但它不起作用.
I have already tried "https://stackoverflow.com/questions/41970435/how-to-generate-ipa-file-for-react-native" but it is not working.
推荐答案
react-native run-ios --configuration=release
将使用捆绑包在模拟器或设备上运行您的应用.
Will run your app on Simulator or Device with the bundle.
或者只是从 Xcode 构建它(发布构建总是包含包)或者运行调试版本,但在此之前,您应该:
Or just build it from Xcode (release build always includes the bundle) Or run the debug release but before that, you should :
react-native bundle --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios
另外,由于我们需要运行这个,所以没有找到新的 react-native 版本 index.ios.js,
Also, new react-native versions index.ios.js not found because of we need run this,
react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
这篇关于如何在 React Native 中离线捆绑 iOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!