1

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.

Anantha kumar
  • 335
  • 2
  • 13
  • have to created the build using `gradlew assembleRelease` command ? – Ahsan Sohail Nov 30 '18 at 20:38
  • yes. `./gradlew assembleRelease` – Anantha kumar Nov 30 '18 at 20:43
  • may be you are missing some steps on android it should work fine with that command on android, howerver on IOS you need you manually link your assets directory in the project from xCode. – Ahsan Sohail Nov 30 '18 at 20:47
  • They were working fine before. Will the bundle size affect the loading of images? And Thanks I ll try to move local assets to respective Native Image Assets. – Anantha kumar Nov 30 '18 at 20:50
  • it should work on android i've face this issue when i run the application by connecting my mobile in debug mode after some time when the packager is close the assets start disappearing but for release build it shouldn't be an issue. Not sure why are you facing it. – Ahsan Sohail Nov 30 '18 at 20:53

1 Answers1

1

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.

Ahsan Sohail
  • 660
  • 6
  • 17