An application for working with iOS applications that does not show static assets (images) after deployment

I have all my static images in the "images" folder in the root of my project. However, after running the following command to connect my application, the application works, but the image does not appear.

The command I use to combine:

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

Notice that the resource folder is created and it has an image folder with all the images in order.

You can help?

+8
source share
4 answers

The resource assignment and main.jsbundle must be in the same folder. Try:

./react-native bundle --minify --entry-file index.ios.js --platform ios --dev false --bundle-output ./release/main.jsbundle --assets-dest ./release

In either case, the packer will create a resource folder.

, :

-- .sh, XCode, main.jsbundle , , . , , . - main.jsbundle . , " " → " ".

+15

, XCode. , "{ }.app/assets/resources/.."

enter image description here

, , iOS. "assets" " ".

1: XCode → →

2 enter image description here

3 enter image description here

4 enter image description here

+16

- :

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

asset main.jsbundle ios. Xcodebuild phasescopy bundle resources, asset main.jsbundle. Copy if needed

+3

I fixed this problem by changing my xcode version from 9.3to9.2

-2
source

Source: https://habr.com/ru/post/1628425/


All Articles