自定义字体不适用于 iOS 10 中的 iMessage 扩展

Custom fonts not working with iMessage Extension in iOS 10

我正在开发 iMessage Extension,我需要在其中使用我在其容器应用程序中使用的自定义字体。在 iOS 应用程序自定义字体工作正常。但是在 iMessage Extension 中,它可以在 Interface builder 中访问,但是当在输出中显示时,没有自定义字体效果。以系统字体显示。

界面生成器UI设计

输出

我还在 iMessage Extension 的 info.plist 文件中设置了 Fonts provided by application,但没有用。

是否可以在 iMessage 扩展中访问自定义字体?或者还有其他使用方法吗?

如果有人有想法,请帮助我。

请确保您已在项目资源中添加所有 TTF 文件。并且 select Target Membership 适用于您要在其中使用此字体的所有 Target。检查下图。