Search code examples
androidiosreact-nativefontscustom-font

react-native custom fonts error unrecognized font-family


I need to use custom fonts in react-native- in iOS it is working Fien. but on iOS it giving error. unrecognized font-family. I have follow many tutorials but none is working in my case. Here are some links that I have followed.

link 1

link 2

link 3

Here are two issue. if the fonts are added in copy bundle resources then it produce multiple command error and if I remove these from this then the project build but it give error unrecognized font family I have added then in react-native-config.js font files are visible in resources file and also in the info.plist file. but there are n0t working.


Solution

  • Create File "react-native.config.js" not "react-native-config.js"

    After add the font try react-native link otherwise manually add fonts in Resources in xcode project.

    Try this medium link https://mehrankhandev.medium.com/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4