Add custom font to Xcode (for LaunchScreen)

My app uses a custom font. I want to use this font in the LaunchScreen storyboard too. Anyone know how to do this?

I’ve got this far…

  1. I created a LaunchScreen storyboard in Xcode, using my custom font, and stored the storyboard file in my project repo.
  2. In CMake, I have the following to get the LaunchScreen.storyboard into Xcode. (I’m using Qt which provides support via a custom property.)
set_target_properties(MyTarget PROPERTIES
  1. In CMake, I copy the font to the Resources folder
target_sources(MyTarget PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/MyFont.ttf")
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/MyFont.ttf" PROPERTIES
  1. In Info.plist, I add the font

The only step that doesn’t work is step 3. Whereas this approach works fine for adding, say, an image to the built Resources folder, my font file doesn’t show up.

NB: When I originally added the font to Xcode to create the LaunchScreen storyboard, I followed these instructions from Apple. The first step adds the font file to Resources and adds it to MyTarget. Obviously every time I run CMake it recreates the Xcode project and so this font is lost, which is why I need to include it via CMake.