Custom Font in ios not working

Not only does the file needs to be added to the project, but it needs to be added to the target as well.

Sometimes (as in my case), when drag and dropping the “.ttf” file in Xcode, the “add to target” is not checked. This means the file is actually visible in your project, but it is not embedded in the app.

To make sure it is:

  • Click on the project’s name (left pane)
  • Then on the target (middle pane)
  • Then “Build Phases” (third tab on the right pane)
  • Then “Copy Bundle Resources”

You should see the font file in that list.

Leave a Comment

tech