4

For the past 4 months, I've been using Moarfonts, a Build Phase Run Script that allows you to use custom fonts in Interface Builder.

Today, when trying to build my app, the compiler thew a bunch of errors like this:

error: Failed to install Brandon Grotesque Bold: The file “Brandon_bld.otf” couldn’t be opened because there is no such file.

Not sure if these are related, but today, before building and failing, I:

  • Upgraded to Xcode 5.1.1 from 5.1
  • Opened up a copy of Xcode 4.6 to build and run an older project of mine
  • Back in Xcode 5.1.1, ran the following commands in the terminal at Xcode's request:
    • sudo chmod a+w /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/.lilid
    • sudo chmod a+w /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/.lilid/.lilic

I've removed all the fonts from the Copy Bundle Resources Build Phase, and everything else looks sane.

Any ideas?

Charles
  • 50,943
  • 13
  • 104
  • 142
djibouti33
  • 12,102
  • 9
  • 83
  • 116

1 Answers1

7

I had the same problem. Running /usr/local/bin/moarfonts reset in a build phase once, then restarting Xcode again helped me. Afterwards you should remove the build phase again.

Alfonso
  • 8,386
  • 1
  • 43
  • 63
  • I get `error: SDKROOT environment variable is not set` in the terminal – djibouti33 Apr 14 '14 at 21:55
  • Ah, I'm sorry, I forgot: You have to run this as a build phase. I'll update my answer. – Alfonso Apr 14 '14 at 21:57
  • 1
    actually, the 2nd symptom, 2nd solution on the developer website lists the solution, which is similar to yours, but you have to export SDKRoot first. http://pitaya.ch/moarfonts/. I can't believe I missed that. I think I read Solution 1 but not 2. Doh! – djibouti33 Apr 14 '14 at 21:58
  • Ah, I only saw them now from the comments on your question. If you run it as a build phase you don't need to set the SDKROOT, xcodebuild will take care of this. But the command line solution is cleaner I think. – Alfonso Apr 14 '14 at 22:01
  • Solution 2 on the developers site worked for me. pitaya.ch/moarfonts. – Peter Todd Apr 16 '14 at 08:42