Anantha kumar
Anantha kumar

Reputation: 375

React Native some Images are not visible in production build

Some local images aren't visible in certain views. This happens mostly in production build. In dev mode, its little late to appear but appears with 1s or 2s delay.

I tried moving all of Image resources import to a single file, the performance improved a little in dev mode but not in production. It happens in both ios and Android.

Upvotes: 1

Views: 1960

Answers (1)

Ahsan Sohail
Ahsan Sohail

Reputation: 670

For Android When you are running the application in debug mode the assets are loaded from the packager and cached in the application but after some time the packager is closed and cache is reset the assets disappears. Follow the link to generate signed apk for android, it bundles all the assets required in the app with the apk.

https://facebook.github.io/react-native/docs/signed-apk-android

For IOS You need to manually link your local asset folder in the ios project using xcode.

Upvotes: 1

Related Questions