11

I need to register an App ID in my Apple Developer account and saw under the 'Capabilities' section 'Fonts'. Which I found on means 'Fonts: Font Installation allows your app, with user permission, to install and use custom fonts."

I ticked that box thinking that it's related to using custom fonts in my app but got a warning message in Xcode:

'Waring: Provisioning profile "iOS Team Provisioning Profile: My Bundle ID for MyAppName contains entitlements that aren't in the entitlements file: com.apple.developer.user-fonts. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile. (in target MyAppName).'

The worse thing is after I untick the Fonts capabilities box in order to get rid of the warning, a modal says 'Modify App Capabilities: Adding or removing any capabilities will invalidate any provisioning profiles that include this App ID and they must be regenerated for future use.'

After watching this video, I think 'Fonts' under 'Certificates, Identifiers & Profiles' > 'Capabilities' is for 'Ability to register fonts system-wide'. Whatever that means...

'Adding a custom font to your app' page but doesn't mention the 'Fonts' under 'Capabilities' when Register an App ID. Link

I think the Fonts capabilities are new and that's why their documentation is inconsistent. Does anyone know in what circumstances do you need to tick that Fonts capabilities box and how to use it?

Thanks

Dharmesh Mansata
  • 2,406
  • 19
  • 30
Cocodenut
  • 125
  • 12

2 Answers2

14

Does anyone know in what circumstances do you need to tick that Fonts capabilities box and how to use it?

Yes, new in iOS 13 your app can include fonts and can make them available to all the user’s apps by calling CTFontManagerRegisterFontURLs. This is called installing fonts. You need the capability to do that. The capability is explained at 5:46 of the video you cited in your question. Watch the video, it explains all about this.

You do not need the entitlement merely to include and use fonts within your own app.

matt
  • 447,615
  • 74
  • 748
  • 977
  • Thanks for the explanation. Do you know how to regenerate a provisioning profile? Does it mean I need to delete and re-add that identifier? I tried but it didn't let me because it's linked to an app in the App Store. Now I'm stuck with that warning message and worry about I might lose the app name if I mess around deleting things. – Cocodenut Oct 24 '19 at 06:55
  • 1
    It doesn’t affect the app that’s already in the store. It affects building going forward. See https://developer.apple.com/library/archive/qa/qa1878/_index.html – matt Oct 24 '19 at 13:32
  • The doc helps, now that I see the provisional profiles are in https://developer.apple.com/account/resources/profiles/list, but I haven't generated any provisional profiles yet. I can get rid of the warning message by clicking in Xcode: Product > Clean Build Folder and the warning only comes back if I plug in my phone to build and run the app. The warning doesn't appear if I build in a simulator device. Makes me wonder if it's something I can ignore... – Cocodenut Oct 24 '19 at 15:48
  • Well, if you're using manual provisioning for this project, I would just go ahead and create the new provisioning profile. However I'd like to suggest that we are now off topic. The question was what this entitlement / capability is for, and we have settled that. The question of what to do if you accidentally turn on an capability you don't need for an app that is already in the store is a completely different issue. :) – matt Oct 24 '19 at 15:51
  • Just found this page https://help.apple.com/developer-account/#/dev037e8f543?sub=devfdb3dfeed about Edit, download, or delete provisioning profiles. – Cocodenut Oct 24 '19 at 16:03
1

Since iOS 13, apps can make use of a Fonts entitlement, with a sub option 'Use Installed Fonts' to use custom fonts installed by special font provider apps. Font provider apps make use of the same entitlement, but with sub option 'Install Fonts'. Examples of such apps are CreativeCloud from Adobe and MyFonts from MonoType.

You only need to add the Fonts entitlement to your app, if you want to use fonts installed by said font provider apps, or if you are developing a font provider app yourself.

Ely
  • 5,159
  • 1
  • 34
  • 51