2

Environment:


xCode 12


react-native-cli: 2.0.1


react-native: 0.63.4

Hi! I'm trying release build with react native bare workflow.
Debug build was no problem, But after implementing release build, my app doesn't show any images form assets directory.

Xcode log is like this.


> [native] Could not find image file:///var/mobile/Containers/Data/Application/610F6543-2E6A-404E-8D54-6506084093DE/Library/Application%20Support/.expo-internal/assets/assets/icon_password.png

I tried ways below URl, but I coudn't solove the problem after all.


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

Please give me your knowlege...:/

Sargis
  • 1,196
  • 1
  • 18
  • 31
Noda Yuta
  • 23
  • 5

1 Answers1

1

I faced this problem too.

My steps to solve the problem were:

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

This command, among other things, creates main.jsbundle file and assets folder in ios directory

  1. Add "main.jsbundle" and "assets" folder to 'Copy Bundle Resources'.

  2. Rebuild project.

p.s This post helped me a lot https://stackoverflow.com/a/35366243

Hope these steps help you!

domartynov
  • 58
  • 5