问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/58510316/apple-developer-what-is-the-fonts-capability-under-register-an-app-id-for