entria / react-native-fontawesome

React Native Font Awesome Icons
MIT License
176 stars 34 forks source link

Icons not visible in build android and iphone #55

Closed glasje closed 5 years ago

glasje commented 5 years ago

I published my project and when I open it on iphone and android the icons are not visualized. Should I add the icons to the project? attached image image

leandrosimoes commented 5 years ago

Did you put the font files in the right places? Did you check if the font files names are correct? Like this: fa_regular_400.ttf fa_solid_900.ttf fa_brands_400.ttf What is the package version that you are using? The last 6.0.1? Are you using the IconTypes enum to chose between FAR, FAS or FAB?

glasje commented 5 years ago

when I installed the package I got the error that the sources were not. solve it by loading the fonts in the app.js

image

but the problem was generated when I generate the APK. When installing it happens that with the icons. I'm using the latest version 6.0.1 image

In development if you see

leandrosimoes commented 5 years ago

Get a look in this tutorial to put the font files in ios and android and see if you are missing something. I think that the problem is that you're loading the files dynamically.

glasje commented 5 years ago

For iphone is solved (attached image of iphone). When I open for the first time the application on Android does not show the icons but if I close the apps and then I go back to this the icons are loaded. iphone

I share the link of the apps that is in expo. https://expo.io/@glasje/LibreriaComponentes

leandrosimoes commented 5 years ago

Well, I think that it is because the dynamic load of the font files, as I said before. Did you saw my previously answer? Get a look in that article that I linked in the answer to see if you can add the files manually to compile with the app.

glasje commented 5 years ago

I managed to solve the problem by loading the sources in the following way. image

image

Thank you very much for the help

AugustusCosta commented 5 years ago

As workaround just rename the name of files changing "-" for "_" .