Search code examples
iosobjective-cxcodeapple-watch

Custom font in Apple Watch simulator doesn't show


I'm making a simple Apple Watch app, using Objective-C, and I'm trying to use a custom font.

I have added the font to the info.plist, and also the supporting files folder. The font does work in the storyboard, but when I run the app in the simulator it's just the regular system font. Any ideas?

(I haven't used any code to set up the font)


Solution

  • Have you included the custom font file in both your WatchKit extension bundle and the WatchKit app bundle? The reason for this is you need to be able to create strings with the font at runtime (via the WatchKit extension), then the information is sent to Watch and the font from the WatchKit app's bundle is used to render the string on Watch.

    Then it's simply a case of adding it to the UIAppFonts key in your Info.plist file as you mentioned.

    Apple has documentation on using custom fonts, found here.

    Hope this helps!

    J