react-native: Xcode 11: Error loading local image when build release
In Xcode 10 everything is okay but after upgraded to Xcode 11 and build release, the local image not showing in iOS both Simulator and Real Device.
React Native Environment Info:
System:
OS: macOS 10.14.6
Binaries:
Node: 10.13.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
IDEs:
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
react-native run-ios --configuration Release
either run release from Xcode- Local image not showing
react-native run-ios | react-native run-ios --configuration Release |
---|---|
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 24
@pabloluz I temporarily fixed this issue by the following:
ios
=> Create folderassets
Inside folder
assets
=> create folder structure same as folder where you keep image in the project (In my case I kept all the images inapp > src > assets > image
) and copy all images to this folderOpen Xcode => Select project target =>
Build Phases
Drag folder
assets
which we have created intoCopy Bundle Resources
Copy items if needed
and pressFinish
Done!
PS: If your images name like this
my_image.ios.jpg
you need to rename them tomy_image.jpg
.In my case I was using resizeMode=‘center’ and when I changed from ‘center’ to ‘contain’ it solved my problem.
same me too, after main.jsbundle set to
Copy Bundle Resource
. Local Image not show if release scheme. On debug scheme Local image showing.RN: 0.60.4
any solution for this issue ?
Local Image not show if release scheme. On debug scheme Local image showing. RN: 0.61.5 any solution for this issue ?
not working this steps in Xcode 12
Works for me
Started experiencing the same issue with RN 0.59.9 after it had worked fine for months. I suspect it does indeed have to do with an Xcode update. Does anyone know if this is occuring on newer RN versions as well?