New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ios: Local images are not rendering in 0.62.2 #29237
Comments
Yup I'm getting the same problem. I made a new project with |
OS: macOS Big Sur(11.0 Beta版 20A4299v) |
Same issue, ios 14. |
Same issue here! |
Are you also having a problem only with local files that your application is storing? I am using RNFetchBlob to store these files. Do you? The problem may be different behavior of RNFetchBlob on iOS compared to android. |
I have this problem with local assets in my RN app project, as well as rendering remote assets with a url. |
As I wrote above, in my case local assets work fine, and I am not using url to display images. |
I am closing this issue. I need to do some more tests. |
Hello, you solved the problem with local image paths? I don’t understand why the author closed the ticket |
I didn't solve the problem yet, but I realized that I need to do more tests before posting an issue. At least some of the comments reported other issues - like displaying assets and rendering from a URL, so they should open other issues. You can also open an issue, explaining your problem. |
I have the same issue |
I have same issue with iOS 14. It doesn't show local images in my react native app. |
so, how to solve it in iOS 14? |
This has been fixed in 0.63.2 See https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#v0632 See #29279 for more info. |
I am reopening this until we test it in 0.63.2 and see that the problem has been solved. |
Could we get a hotfix for 0.62? |
Looking for a 0.62 emergency fix for this as well. Way to go Apple, way to go... |
i can't update the react-native to 63 yet... need a fix on 62 |
For anyone that cant't upgrade to 62 like me and need to fix this, get yourself set up with https://github.com/ds300/patch-package and then put this in your patches folder:
diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..0ff66f3 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -275,6 +275,8 @@ - (void)displayLayer:(CALayer *)layer
if (_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
+ } else {
+ [super displayLayer:layer];
}
} |
Hotfix for RN 0.61.2 please. I cannot make it work, even my bottom navigator doesn't have images |
This worked for me for Debug on RN 0.61.5, but it won't work for Release! Any idea why? I've even downgraded from Xcode 12 to 11.1, hoping that would solve the issue, but it didn't. This is the output of
|
If you've used my patch verbatim then it's probably not working because you're on a different version and patch package won't like that. |
Yes, I've done the changes manually and applied |
It's likely to be a caching issue somewhere in the build process I would wager. Not much else I can do to help, my patch was just the following commit: b6ded72 I don't have any real deeper understanding of this issue. |
It is a bit obscure, as we've tried doing it in another computer with Xcode 11.1, and the issue still persists. On Android it does build correctly, I'll try with a blank slate project and see if it could be any of the Cocoapods libraries I use that's causing the issue. |
The 0.63.2 release includes a two line fix. Unfortunately that commit wasn't included in the 0.62.3 release. Fix image cannot show in iOS 14 (123423c) Manually applying this change fixed image loading for me. (RN62.3 + xcode 12.5) |
This one worked for me on RN 0.62.3 as I can't currently update to 0.63.x yet for the maintenance support app that I am working on |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
I am rendering local images, using the 'Image' component, on android, with path like file:///data/user/0/com.xxxx/files/productdata_da13681addffaed7622ece9b2bb56e22bc65f6b9.jpg.
On iOS, however, these images are not rendering.
I tried the suggestion in https://stackoverflow.com/a/54627588/5532513, didn't help.
React Native version:
System:
OS: macOS 10.15.5
CPU: (8) x64 Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
Memory: 1.49 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.16.2 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6514223
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
Steps To Reproduce
Just using:
Expected Results
Images should be displayed.
The text was updated successfully, but these errors were encountered: