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.31k stars 2.12k forks source link

FontAwesome6 is not working #1551

Closed Florent75 closed 8 months ago

Florent75 commented 9 months ago

Hi,

I updated to version 10.0.0.

All icons are working except FontAwesome6.

Here is my code :

import Icon from 'react-native-vector-icons/FontAwesome' import Icon5 from 'react-native-vector-icons/FontAwesome5' import Icon6 from 'react-native-vector-icons/FontAwesome6'

                <TouchableOpacity style={{ flex: 1, alignItems: 'center' }} onPress={() => this._SetLineItemMissing()}>
                    <Icon5 name="edit" size={30} color={colorsG.green_1} />
                </TouchableOpacity>
                <TouchableOpacity style={{ flex: 1, alignItems: 'center' }} onPress={() => this._SetLineItemMissing()}>
                    <Icon name="tasks" size={30} color={colorsG.blue_1} />
                </TouchableOpacity>
                <TouchableOpacity style={{ flex: 1, alignItems: 'center' }} onPress={() => this._SetLineItemMissing()}>
                    <Icon6 name="jar-wheat" size={30} color={colorsG.blue_1} />
                </TouchableOpacity>

I have the following error "Could not resolve "@expo/vector-icons/FontAwesome6"

Could you please give me a hand ?

matthewadel commented 9 months ago

go to info.pilst file and add these lines

<string>FontAwesome6_Brands.ttf</string>
<string>FontAwesome6_Regular.ttf</string>
<string>FontAwesome6_Solid.ttf</string>

under the key

<key>UIAppFonts</key>

then add the font in copy bundle resources section under build phases 8Gh7b

then execute pod install and re-run the application from xcode

johnf commented 8 months ago

You are using @expo/vector-icons somewhere which overrides this package and doesn't yet support FOntawesome6. You need to wait for https://github.com/expo/vector-icons/issues/273 to be resolved. Removing @expo/vector-icons might work but I'm not sure.