0

I am attempting to make a TTF font file available to my main application and also in my photo editing extension. But the font isn't found when I attempt to access it by name in the extension, although it works in the main app.

I've selected the TTF file and in the File inspector I've checked AppName and AppNameExtension to add them both targets. I ensured the font shows up in Extension > Build Phase > Copy Bundle Resources. The font name and extension exists as the first index of an array for the “Fonts provided by application” in the extension's Info.plist. And I am calling it in code by its proper name. Again, it is working in the main app but not the extension.

Did I do something wrong in order for that resource to be available in the extension, is this not possible in the extension, or is this a bug I should report?

Jordan H
  • 52,571
  • 37
  • 201
  • 351

1 Answers1

0

It seems you have everything correct and it is possible I had some issues trying to get it to work as well but it turned out I had thoughtlessly selected the font I wanted to use in Interface Builder before I created the "new" font for the extension and it seemed to be trying to reference the font in the container app, I removed that reference and set it programmatically.

You have to be a little more careful debugging with iOS extensions as Xcode doesn't seem to be as "helpful" as it is in the container app in regards to debugging messages, at least in my opinion currently.

arvinkx
  • 164
  • 1
  • 11
  • So you were able to make a font file available inside the photo editing extension? I'm not using it in IB, just programatically. – Jordan H Oct 16 '14 at 01:41
  • I was able to get it to work in an Action extension but I wouldn't think the method is different or that there's a documented limitation to the Photo Editing extension, not that I have seen at least. – arvinkx Oct 16 '14 at 01:57
  • Well, I went ahead and removed the font and the key in the plists then added it back, now it's working. Not sure what the problem was. – Jordan H Oct 16 '14 at 03:48