Sorry for repeating this post, but an answer is desperately needed. Whenever I add custom fonts to "Fonts provided by application" the fonts are not retained and the "Fonts provided by application" setting disappears. This happens when I leave the Custom IOS Target Properties/Info tab. I have attempted this with numerous otf/ttf fonts. Using macOS Monterey 12.7.5 and X Code 14.2. See before and after screenshots.
Saving custom fonts to XCode 14 issue
I see the history of your questions over in your other thread as well. Have you tried directly adding the key-value pairs to the Info.plist file in the Xcode file list instead? Another choice is to option-click on the Info.plist file in the file navigator and choose Open as > Source Code, and then you can modify the key-value pairs directly.
Thanks for your reply. There is no info.plist in the Navigator after Xcode 13, unless I am mistaken. The fact remains, that literally, every instruction calls for adding the cystom fonts the exact way that I’m doing it and yet the “Fonts provided by application” array disappears after I create it. It can’t just be me that has this experience. If someone can explain to me how to actually access the info.plist file that would be a bug help. Thanks again.
With the changes to Info.plist in Xcode 13 applied to new apps created with that version or later, there is a reduced need for having that file as an actual file on disk compared to previously. This is because many of the values needed in that file can be specified as build settings instead.
When you're in a situation where there is still a need for an Info.plist file to be specified — and your font needs are one of them — editing the values in the Info pane of the target should create the file and place it on disk for you. Examples of when that would happen are when you add a key that your app defines (rather than a key defined by the system), or when you need to fill in system values like dictionaries or arrays that can't easily be represented by a single build setting.
It's unusual that you're not seeing that happen, so I would create the file manually, and ensure its file path is referenced in the Info.plist file
build setting, like my colleague specified in your other forums thread, and add the UIAppFonts
key there, and then set the array contents to your font file names.
One other note when reviewing your build settings, make sure Generate Info.plist file
is set to Yes
. This key indicates that the build should generate the final Info.plist file at build time, which then will include the values set in the build settings, as well as in the Info.plist file in your source code.
I have creaes an info.plist source code and added the fonts. After testing, I’ll advise. Thank you
Update: I restarted my project because I wasn't happy with it. I am not experiencing the 'Font applied by application' issue with the new as I did with the previous project. No answer other than an anomaly??? Thanks for your help.