2

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 ??

BloodyMonkey
  • 1,572
  • 1
  • 9
  • 15
  • Have you added the else block in file react-native/Libraries/Image/RCTUIImageViewAnimated.m – Jignesh Mayani Feb 17 '21 at 09:36
  • Have you read my post ? react native 0.62.2 fixed that and i checked anyway – BloodyMonkey Feb 17 '21 at 09:41
  • @Jigneshmayani I forgot to precise, i have this error for each images of my project: [framework] CUICatalog: Invalid asset name supplied: '(null)' – BloodyMonkey Feb 17 '21 at 15:32
  • Possible duplicate (also with no answers): https://stackoverflow.com/questions/67529743/local-image-is-not-being-rendered-in-release-and-testflight – Kolby Aug 01 '21 at 15:51

1 Answers1

-1

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];
  }
Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
  • Thanks for the answer, but please read the OP. It clearly states this is not the problem in bullet point 3. – Kolby Aug 08 '21 at 17:54