-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fix image cannot show in iOS 14 #29420
Conversation
Base commit: f00795d |
Base commit: f00795d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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
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
Summary: This PR is to fix facebook/react-native#29279, which image cannot show in iOS 14 As facebook/react-native#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/react-native#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
Was this tested on iOS release mode? It doesn't seem to work for me |
If image is not showing on your ios simulator or phone the best bet is to resolve it by upgrading the react-native version within your project resolve merge conflicts run below command sudo gem uninstall (each item from above command) sudo rm -rf ~/.cocoapods sudo gem install cocoapods cd (PROJECT DIRECTORY) pod init (put cocoapod in podfile) pod install rm -rf ~/.cocoapods/repos/trunk/ pod cache clean --all pod install` |
I had the same issues this what I did #29420 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed for me.
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 change monkey patches React Native on versions prior to 0.63.2 to fix a bug with images not rendering when on iOS 14. See facebook/react-native#29420.
This change monkey patches React Native on versions prior to 0.63.2 to fix a bug with images not rendering when on iOS 14. See facebook/react-native#29420.
This change monkey patches React Native on versions prior to 0.63.2 to fix a bug with images not rendering when on iOS 14. See facebook/react-native#29420.
This change monkey patches React Native on versions prior to 0.63.2 to fix a bug with images not rendering when on iOS 14. See facebook/react-native#29420.
Is there any plan to cherry pick this commit back into RN |
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
same issue in release mode, any solution? |
If you get this error while taking the step (sudo gem install cocoapods): "You have to install development tools first". Just run: that worked for me. |
@tomcheung But that's exactly what I've got already on react-native/Libraries/Image/RCTUIImageViewAnimated.m (see below) and still not displaying images for device... :-(
|
same issue here on ios 15 and Xcode 12.5 |
I still have this issue...any solution? It passed two years |
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 letUIImageView
handle still image renderingChangelog
[iOS] [Fixed] - Fix image cannot show in iOS 14
Test Plan
Image can be shown in iOS 14 build with Xcode 12 beta, using
It may also need to test gif image is render correctly