79700090

Date: 2025-07-13 16:24:44
Score: 3
Natty:
Report link

After struggling with React Native vector icons (from react-native-vector-icons) not showing in my iOS app, I finally solved it. Here's a detailed step-by-step that might help others facing the same issue.

Problem

Icons were rendering perfectly on Android, but nothing appeared on iOS. No errors, just missing icons.

My Setup

Root Cause

On iOS, react-native-vector-icons uses custom font files (like Ionicons.ttf, FontAwesome.ttf, etc.). These font files need to be:

  1. Declared in your Info.plist
  2. Physically added to your Xcode project
  3. Included in Copy Bundle Resources

Without step 2 or 3, icons won’t render even if you import them correctly in JS.

Solution

  1. Add Fonts to Info.plist

Inside ios/YourApp/Info.plist, add the font files like this:

<key>UIAppFonts</key>
<array>
  <string>AntDesign.ttf</string>
  <string>Entypo.ttf</string>
  <string>EvilIcons.ttf</string>
  <string>Feather.ttf</string>
  <string>FontAwesome.ttf</string>
  <string>FontAwesome5_Brands.ttf</string>
  <string>FontAwesome5_Regular.ttf</string>
  <string>FontAwesome5_Solid.ttf</string>
  <string>Foundation.ttf</string>
  <string>Ionicons.ttf</string>
  <string>MaterialCommunityIcons.ttf</string>
  <string>MaterialIcons.ttf</string>
  <string>Octicons.ttf</string>
  <string>SimpleLineIcons.ttf</string>
  <string>Zocial.ttf</string>
</array>

info.plist

  1. Add .ttf Fonts to Xcode Project

Add Files to.

node_modules/react-native-vector-icons/Fonts
  1. Ensure Fonts Are in "Copy Bundle Resources"

Copy Bundle Resources

  1. Clean and Rebuild

from Xcode:

If you're still facing issues after this, feel free to comment.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same issue
  • Low reputation (1):
Posted by: SanjivPaul