Issue(android): where to place image assets relative to js bundle file if bundle file is located outside of project root?
We have a small service where we upload JS bundles on each build. So, for example we have app com.example
, if we want to update our app(while app review is pending in the app store) then we:
- download JS bundle to android path
/data/data/com.example/files/bundle/android.bundle
- set this bundle as active via https://github.com/mauritsd/react-native-dynamic-bundle
Imagine that in the react App component we have a single image with path star.png
.
When we activate a new bundle then star image is not shown.
I've checked the image path via https://reactnative.dev/docs/image#resolveassetsource in release build and the image uri resolves just to star
.
So I tried the following file structures:
№1
data
--data
----com.example
------files
--------bundle
----------android.bundle <= dynamic bundle from remote server
----------star // <= our image
№2
data
--data
----com.example
------files
--------bundle
----------android.bundle <= dynamic bundle from remote server
----------star.png // <= our image
But still image is not shown if the bundle file is outside of the project root.
Questions:
- What am I doing wrong? https://github.com/Microsoft/react-native-code-push somehow managed to solve it.
- Is ios solution the same one as for android?
Thanks in advance