Currently, I am facing an issue with loading local images in my react-native application. Interestingly, the images load perfectly fine when the server is running in development mode, but they do not appear when using the release version. Strangely, the app itself functions without any problems.
The method I am using to load the images is as follows:
// components/Test.js
export default function Test() {
return (
<Image source={ require('../assets/icons/food/cupcake.png') } />
);
}
I am wondering if I am making a mistake somewhere in this process. Do I need to make changes in xcode or adjust some settings? Additionally, during dev mode, I have observed that the images seem to be requested from the dev/hot loading server every time there is a render, rather than being bundled along with the JavaScript code.
My current setup includes:
- react-native version 0.34
- xcode Version 8.0 (8A218a)