Wrong Vector Icon Resources
See original GitHub issueIssue Description
Can’t display correct Icons due to evident mismatch between internal react-native-vector-icons
version and copied “Fonts” resources. Specifically, Feather icons are periodically broken (in the current version of Native Base, they are broken).
This issue is related to #2453, #2528 and probably others but, in my opinion, the problem is not addressed in the right way.
node, npm, react-native, react and native-base version, expo version if used, xcode version
node: 10.15.3 npm: 6.4.1 react-native: 0.60.5 react: 16.8.6 native-base: 2.13.5 expo: not used xcode: 10.3 (10G8)
Expected behaviour
Install and link Native Base as intended and get the correct Icons displayed.
Actual behaviour
After normal installation I get wrong mapped icons or even not mapped icons at all.
Steps to reproduce (ios for convenience)
- yarn add native-base
- react-native link native-base
- cd ios && pod install
- Render the Feather
clock
icon displays a cute storm icon, for example…
Is the bug present in both iOS and Android or in any one of them?
Both platforms are affected.
Any other additional info which would help us debug the issue quicker.
If I replace the correct react-native-vector-icons
Fonts (now the correct version is the 6.1.0
), everythig works as expected.
Isn’t more maintainable to rely directy on react-native-vector-icons
resources instead of copy them in native-base
? Or at least is important to replace all vector icons resources every time the internal react-native-vector-icons
dependency is updated!
Thanks for your help!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
I meet the same issue with react-native@0.60.5 and native-base@2.13.5 in Android. Feather icon names do not match the icons.
The “package.json” file of native-base@2.13.5 says it depends on react-native-vector-icons@6.1.0, which is installed correctly. But the *.ttf files in “android\app\src\main\assets\fonts” are not copyed from “node_modules\react-native-vector-icons\Fonts”, yet from “node_modules\native-base\Fonts” in the process of linking, and *.ttf files from the two places are not the same. This is the reason.
Hope for official repair.
Temporary&Manual fix: After the process of linking, replace *.ttf files in “android\app\src\main\assets\fonts” with *.ttf files in “node_modules\react-native-vector-icons\Fonts”.
Can you check with with 2.13.6?