Posts

Showing posts from March, 2021

[Fixed]Images are not showing in iOS 14

Image
Original Post:  https://theblueplug.com/images-not-showing-in-ios-react-native/   1.  run "npm i -g patch-package"  2. Create a folder named "patches" in your root of the project 3. Get the react-native version from the package.json file (it should be under dependencies section) For Example :  "react-native" : "0.61.5" , 4. Create file named  react-native+<version_code>.patch Example :  react-native+0.61.5.patch 5. Add the below code into that file diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m index 21f1a06..2444713 100644 --- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m +++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m @@ -272,6 +272,9 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink - (void)displayLayer:(CALayer *)layer { + if (!_currentFrame) { + _currentFrame = self.image;