【问题标题】:React Native BareWorkflow images don't show when ios release buildios发布构建时不显示React Native BareWorkflow图像
【发布时间】:2021-01-15 06:39:23
【问题描述】:

环境:

xCode 12

react-native-cli: 2.0.1


react-native: 0.63.4

嗨!我正在尝试使用 react native 裸工作流发布构建。调试构建没有问题,但是在实现发布构建之后,我的应用程序没有显示任何图像形式的资产目录。

Xcode 日志是这样的。

> [native] 找不到图片 file:///var/mobile/Containers/Data/Application/610F6543-2E6A-404E-8D54-6506084093DE/Library/Application%20Support/.expo-internal/assets/assets/icon_password.png

我尝试了以下 URl 的方法,但毕竟我无法解决问题。

react-native iOS app not showing static assets (images) after deploying

请给我你的知识...:/

【问题讨论】:

    标签: ios xcode react-native


    【解决方案1】:

    我也遇到过这个问题。

    我解决问题的步骤是:

    1. 执行react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle --assets-dest ios

    此命令在 ios 目录中创建 main.jsbundle 文件和 assets 文件夹

    1. 将“main.jsbundle”和“assets”文件夹添加到“复制捆绑资源”。

    2. 重建项目。

    p.s 这篇文章对我帮助很大https://stackoverflow.com/a/35366243

    希望这些步骤对您有所帮助!

    【讨论】:

      猜你喜欢
      • 2021-06-13
      • 2020-02-09
      • 2021-01-05
      • 2023-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-24
      相关资源
      最近更新 更多