项目根目录下
创建文件夹release_ios
688D7EEB-A6B3-47E4-B881-69C8BD195B5C.png2.终端
项目根目录 输入
:react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output release_ios/main.jsbundle --assets-dest release_ios/
3.将文件移动到项目下
image.png image.png
为蓝色图片
4添加copy bundle
image.png
5.代码修改
let RNBundel = Bundle.main.url(forResource: "release_ios/main", withExtension: "jsbundle")
let rnView = RCTRootView(bundleURL: RNBundel,
moduleName: "mainhomePage",
initialProperties: nil,
launchOptions: nil)
网友评论