Nativebase: Wrong Vector Icon Resources

Created on 28 Aug 2019  路  6Comments  路  Source: GeekyAnts/NativeBase

Issue 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)

  1. yarn add native-base
  2. react-native link native-base
  3. cd ios && pod install
  4. 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!

high priority

All 6 comments

Same here.

I meet the same issue with [email protected] and [email protected] in Android. Feather icon names do not match the icons.

The "package.json" file of [email protected] says it depends on [email protected], which is installed correctly. But the *.ttf files in "android\app\src\mainassets\fonts" are not copyed from "node_modulesreact-native-vector-icons\Fonts", yet from "node_modulesnative-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\mainassets\fonts" with *.ttf files in "node_modulesreact-native-vector-icons\Fonts".

Hey, thanks for reporting, will take a look at this one.

Can you check with with 2.13.6?

Can you check with with 2.13.6?

Feather Icons in my project are OK after changing to 2.13.6. Thanks!

Ok, I've updated to 2.13.7 and the icons display correctly! I'm closing this issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aloifolia picture aloifolia  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments

natashache picture natashache  路  3Comments

inv2004 picture inv2004  路  3Comments

agersoncgps picture agersoncgps  路  3Comments