-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
Image cannot show image in iOS 14 #29279
Image cannot show image in iOS 14 #29279
Comments
|
Im facing the same issues
however im on Xcode-beta and iOS 14 |
i have the same issue! |
same issue... |
1 similar comment
same issue... |
Ok so I've found that the issue with Images only happens when the build is made with Xcode 12 Beta. When I make a build using Xcode 11.5 using iOS 14.0 Beta Device Support gotten from here, Images work fine. |
This is a duplicate issue -- #29215 |
|
Use
|
How can I apply this using patch-package please ? Beginner with using patch-package. |
Hi! 1.- run "npm i -g patch-package" |
Worked great thanks. |
It can display the image after adding if I understand correctly, _currentFrame should be for animated image, so if it is still image, we can use the UIImage implementation to handle image rendering, not sure if it is a correct fix. react-native/Libraries/Image/RCTUIImageViewAnimated.m Lines 283 to 289 in 1c634a9
if (_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
} else {
[super displayLayer:layer];
} |
Summary: This PR is to fix #29279, which image cannot show in iOS 14 As #29279 (comment) mention, this issue can be fixed by calling ` [super displayLayer:layer];` it it is still image, to let `UIImageView` handle still image rendering ## Changelog [iOS] [Fixed] - Fix image cannot show in iOS 14 Pull Request resolved: #29420 Test Plan: Image can be shown in iOS 14 build with Xcode 12 beta, using ```js <Image source={require('./images/some_local_image.jpg')}/> ``` It may also need to test gif image is render correctly ```js <Image source={{uri: 'https://some_remote_gif_image.gif'}}/> ``` Reviewed By: p-sun Differential Revision: D22619448 Pulled By: shergin fbshipit-source-id: f4d0ad83af945a6b8099d4eaea5a5f1933c7bfd2
Summary: This PR is to fix facebook#29279, which image cannot show in iOS 14 As facebook#29279 (comment) mention, this issue can be fixed by calling ` [super displayLayer:layer];` it it is still image, to let `UIImageView` handle still image rendering ## Changelog [iOS] [Fixed] - Fix image cannot show in iOS 14 Pull Request resolved: facebook#29420 Test Plan: Image can be shown in iOS 14 build with Xcode 12 beta, using ```js <Image source={require('./images/some_local_image.jpg')}/> ``` It may also need to test gif image is render correctly ```js <Image source={{uri: 'https://some_remote_gif_image.gif'}}/> ``` Reviewed By: p-sun Differential Revision: D22619448 Pulled By: shergin fbshipit-source-id: f4d0ad83af945a6b8099d4eaea5a5f1933c7bfd2
Summary: This PR is to fix facebook#29279, which image cannot show in iOS 14 As facebook#29279 (comment) mention, this issue can be fixed by calling ` [super displayLayer:layer];` it it is still image, to let `UIImageView` handle still image rendering ## Changelog [iOS] [Fixed] - Fix image cannot show in iOS 14 Pull Request resolved: facebook#29420 Test Plan: Image can be shown in iOS 14 build with Xcode 12 beta, using ```js <Image source={require('./images/some_local_image.jpg')}/> ``` It may also need to test gif image is render correctly ```js <Image source={{uri: 'https://some_remote_gif_image.gif'}}/> ``` Reviewed By: p-sun Differential Revision: D22619448 Pulled By: shergin fbshipit-source-id: f4d0ad83af945a6b8099d4eaea5a5f1933c7bfd2
Summary: This PR is to fix facebook#29279, which image cannot show in iOS 14 As facebook#29279 (comment) mention, this issue can be fixed by calling ` [super displayLayer:layer];` it it is still image, to let `UIImageView` handle still image rendering ## Changelog [iOS] [Fixed] - Fix image cannot show in iOS 14 Pull Request resolved: facebook#29420 Test Plan: Image can be shown in iOS 14 build with Xcode 12 beta, using ```js <Image source={require('./images/some_local_image.jpg')}/> ``` It may also need to test gif image is render correctly ```js <Image source={{uri: 'https://some_remote_gif_image.gif'}}/> ``` Reviewed By: p-sun Differential Revision: D22619448 Pulled By: shergin fbshipit-source-id: f4d0ad83af945a6b8099d4eaea5a5f1933c7bfd2
This is not working for me. |
Have you resolved it? |
hi @ralphbourji could you please clarify what do you mean with 4. used required to fetch local image ? |
Hello, what happens to me is that images are correctly displayed on Simulator but not on Device. Is that solving also issue on Device? |
Thanks @tomcheung this quick fix worked for me , images were not showing on debug mode with the compilation of Xcode 12.5
|
Upgrading to React Native 0.63.4 fixed it for me since it has this fix included, but it works on the simulator and when building directly on the device. When I publish to an IPA file, it doesn't work. Anybody know why? I see other people are having the same issue. I'm using an Expo 41 ejected bare workflow React Native project. I had to move all of the images inside of the Images.xcassets to make it work, but it doesn't feel like the correct way to go about fixing it. |
Been following this issue off an on for a while because none of these solutions have worked for me as the issue only happens in release mode on the device. https://stackoverflow.com/a/35366243/5282943 this solution fixed it for me finally. Hope this helps! |
I'm still facing this issue in [email protected] |
@fxricky you can try this , currently, i am using this snippet for this issue |
@RidaRidss @fxricky But that's exactly what I've already on react-native/Libraries/Image/RCTUIImageViewAnimated.m (see below) and still not displaying images for device... :-( |
@smanzini here is the complete file, please replace it with the file exist in node modules, and then build app
|
@RidaRidss I trust you, but just to know where did you find it? thx |
Finally I Made IT! :-) But without copying file from @RidaRidss :-) |
@smanzini how do you fix that issue could you please explain me. |
Hello @udaysagartammina ,
|
@smanzini Thank you so much. |
Still I am Facing the Issue images not displaying after building the IPA files |
I also have this problem, newly added assets doesn't appear on iOS release version... |
this solution is not working for me |
@syedamirali14 did you find any potential solution for this? |
With RN 0.65, Actually, they don't show while the image is downloading, but if there's no connectivity, they show just fine. |
None of solutions work for |
This change here worked for me: #32172 |
If anyone has ejected the app from expo : |
Image cannot show image in iOS 14, but can show location, like:
<Image
source={
require('./images/add_scan_images.png')
}
/>
Environment:
Xcode Version 12.0 beta (12A6159)
Simulator: IPhone SE - 2nd generation - 14.0
"react": "16.11.0",
"react-native": "0.62.2"
The text was updated successfully, but these errors were encountered: