xcode 打包 报错 main.jsbundle does not exist.

报错信息

File /Users/xxx/Library/Developer/Xcode/DerivedData/xxxx-bcaciyvefuadzlfknidhesrsyyir/Build/Intermediates.noindex/ArchiveIntermediates/xxxx/BuildProductsPath/
Release-iphoneos/xxxx.app/main.jsbundle does not exist. This must be a bug with'

  

处理:

  1、先手动创建 main.jsbundle  (ios)

    npx react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle

 

  2、 xcode 项目中找到  Build Phases  在Copy Bundle Resources部分,点击加号(+),然后添加main.jsbundle文件

    

image

 

posted @ 2025-11-14 14:22  zhengyan_web  阅读(7)  评论(0)    收藏  举报