Closed insraq closed 4 years ago
Did you do a full integration? Did you check that the icon name actually exists? What code are you trying with?
After some debug, I have found out the warning come from Icon.getImageSource
. The icon shows up and works, It's just the warning shows up in the XCode console. I believe it's related to how the Icon.TabBarItem works. Since getImageSource
works in async way, there may be cases where null is supplied to <TabBarIOS.item icon={this.state.icon} />
.
I have only integrate Ionicon and everything else works. I haven't used React Native Vector Icon with previous React Native versions. I don't know whether it's a new thing or not.
I'm not getting this in the TabBarExample
project using simulator and icon
should not be set at all until it's generated. Can you provide the code you are seeing this with?
I've tried copying index.ios.js
from TabBarExample
to my project. And I can still see the warning (see attached). So the problem is not in JS side.
I have tried remove node_modules
folder and re-integrate the libraries, using rnpm
and manually, still no luck. I guess there must be some hidden flags in XCode that I mess up?
I have tried 1.3.4 and 2.0. Both have warnings. I have also tried TabBarExample, I did not get any warnings either.
When you upgraded to 0.25, did you also run react-native upgrade
? Does this happen with a fresh project?
I did run react-native upgrade. However the warning is still there. I have also tried to use the template XCode project file and re-link all the libraries - Still no luck.
If you want me to debug this I need a way to reproduce the warning. My guess is that you're using an icon that was removed with Ionicons 3.0.0.
I am testing with 1.3.4 (have tested both actually). The icon shows up alright though.
Yep, then it's something else then :-) Did you try if it happens with a new project using react-native init
?
After wasting a whole day debugging this, I have found out how to reproduce it. So what I did was a clean react-native init
and copy my JS files to the new project. It works without warning. So I thought there must be something missing in my current XCode project file, since it was created in the 0.8 era of React Native. After I set up the project in XCode side, the warning appeared again!
So I did a react-native init
again. This time I made sure I did a clean and rebuild after each step in XCode. I found out the step that causes the warning was creating an Image Set
in Images.xcassets
, which was used in the launch screen. I went a step further to test whether it is the Images Set itself or the fact that it was used by launch screen. And I believe as long as there is an image in the Image Set, the warning will appear, regardless of whether it's used or not.
I am also able to reproduce it in the TabBar example, simply by adding an Image Set (with image).
same problem
Up!
Same issue.
Closing this issue due to inactivity. If you also getting that warning, please feel free to reopen the issue.
Hi,
I am getting CUICatalog: Invalid asset name supplied: (null) warning in XCode console when using Icon.TabBarItem.
I am running React Native 0.25.1 and Vector Icon 1.3.4
Any idea?