NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Wrong Vector Icon Resources

Open filippoitaliano opened this issue 7 years ago • 7 comments

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!

filippoitaliano avatar Aug 28 '19 08:08 filippoitaliano

Same here.

maxhis avatar Aug 29 '19 06:08 maxhis

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\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".

congzhou09 avatar Aug 29 '19 06:08 congzhou09

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

sankhadeeproy007 avatar Sep 02 '19 12:09 sankhadeeproy007

Can you check with with 2.13.6?

sankhadeeproy007 avatar Sep 03 '19 11:09 sankhadeeproy007

Can you check with with 2.13.6?

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

congzhou09 avatar Sep 03 '19 12:09 congzhou09

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

filippoitaliano avatar Sep 04 '19 07:09 filippoitaliano

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\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".

This solution is working <3

ajaymarathe9 avatar Jan 04 '21 19:01 ajaymarathe9