I've upgraded my iPhone device to iOS 14 beta and Xcode 12 beta. Then all Image/Fast Image on my React Native project can not show (which work well on previous iOS 13 and Xcode 11.5).
This is a problem with react-native <= 0.63.1 and iOS 14
This issue is fixed and merged to react native latest version. But if you want to fix your project now or you are using under 0.63.2 versions, there is a solution. (Thanks to https://bityl.co/3ksz)
FIRST SOLUTION : If you can update React Native
Update react-native to v0.63.2 or superior
Its was fixed in this release : https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#v0632
SECOND SOLUTION : If you can't update React Native
node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
From
#pragma mark - CALayerDelegate - (void)displayLayer:(CALayer *)layer { if (_currentFrame) { layer.contentsScale = self.animatedImageScale; layer.contents = (__bridge id)_currentFrame.CGImage; } }
To
#pragma mark - CALayerDelegate - (void)displayLayer:(CALayer *)layer { if (_currentFrame) { layer.contentsScale = self.animatedImageScale; layer.contents = (__bridge id)_currentFrame.CGImage; } else { [super displayLayer:layer]; } }
npx patch-package react-native
git add patches/*
package.json
"scripts": { ... "postinstall": "patch-package", }
It will patch from all patch files whenever you install packages.