oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.4k stars 2.12k forks source link

NSPlaceholderDictionary error while using TabBarIOS #103

Closed varqasim closed 8 years ago

varqasim commented 8 years ago

I have set up RNVI correctly. Added the libRNVectorIcons.a to the Link Binary With Libraries, and made sure that the Fonts folder is under Copy Bundle Resources, and added the fonts that I need in the custom IOS targer properties. I am trying to give the TabBar for IOS an icon with the following code

var Icon = require("react-native-vector-icons/FontAwesome");

<TabBarIOS>
        <Icon.TabBarItem
        iconName="user"
        title="My Vloo">
        <View>
          <Text>My profile</Text>
        </View>
        </Icon.TabBarItem>
</TabBarIOS>
[error][tid:com.facebook.React.RNVectorIconsManagerQueue] Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking getImageForFont on target RNVectorIconsManager with params (
    FontAwesome,
    "\Uf007",
    30,
    4278190080,
    3
)
oblador commented 8 years ago

@qasimalbaqali: Can you get a regular <Icon /> to work? Did you try to clean the build folder? Are you running in simulator or on device?

varqasim commented 8 years ago

@oblador good catch! When i tried using a regular Icon in a text I got the font family not found, so I used the troubleshooting at the bottom of the readmd which made it work! Thank you :)

juanlet commented 6 years ago

facing the same issue as her. How did you solve it? It's not clear from your comments