React native 0.63.4 ios 14 no static images

Viewed 440

I try to build a release with Xcode 12.4 (12D4e) and react native 0.63.4 and local images are not shown but url images are.

I found many topics and solutions about that but nothing work, i'm stuck for 3 days.

  • I have this warning for each images of my project:

    [framework] CUICatalog: Invalid asset name supplied: '(null)'

  • My main.jsbundle and assets folder are in the same folder and listed in Xcode -> Build phases -> Copy Bundle Ressources

  • The bug with RCTUIImageViewAnimated.m on ios 14 is supposed to be resolved due to my react native version > 0.62.2 (i checked the file too and everythings ok)

  • I tried

    <Image source={{ uri: Image.resolveAssetSource(Logo)}}

But i'm unable to correctly build a release on real device, simulator or archiving it on testflight. Debug mode is working fine. What i'm missing ??

1 Answers

I ran into this a while ago, check out this.

  1. go to node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m

  2. find

   if (_currentFrame) { 
     layer.contentsScale = self.animatedImageScale; 
     layer.contents = (__bridge id)_currentFrame.CGImage; 
   } 
  1. and replace with
 if (_currentFrame) {
    layer.contentsScale = self.animatedImageScale;
    layer.contents = (__bridge id)_currentFrame.CGImage;
  } else {
    [super displayLayer:layer];
  }
Related