3

I've added a custom font TTF file to an app I'm making.

Project Bundle

I've also added the UIAppFonts key to the plist, as required.

Project Plist

Now, when I launch the app, it hits the "app is crashing in AppDelegate" breakpoint we all know so well.

App "Crashing"

I can't figure out a way to inspect the exception, but what's stranger is that if I play it through, the app continues just fine -- even allows me to debug. On top of that, the font in question is actually loaded, so there doesn't seem to be any issue there either. Not sure where to start looking for this one.

shortstuffsushi
  • 2,271
  • 19
  • 33

3 Answers3

5

The font file is probably not added to the target.

enter image description here

Community
  • 1
  • 1
2

Please remove the white spaces from the font file name. And change name in info.plist file. And Use the same font name which in in the .ttf file. For more information you can check NSGOD's Answer here

Community
  • 1
  • 1
Pradhyuman Chavda
  • 3,814
  • 4
  • 16
  • 24
  • Hey, I tried editing your comment, and it appears that my changes were lost. Did you reject the edit? – shortstuffsushi Oct 09 '14 at 22:58
  • @shortstuffsushi Hello... yes i saw moderates rejected your update. I didn't do anything. Try to update once again. IF they reject it again then can you pls provide your answer and i will edit it here. – Pradhyuman Chavda Oct 10 '14 at 03:11
1

Do you have a symbolic breakpoint set for "objc_exception_throw"? It will break on all exceptions, including the ones that will be caught by some code's try/catch frame.

Since you are seeing it show the break at UIApplicationMain, it is likely this is the closest source code to the problem. Check the stack frames in the left column to see if there are Apple internal methods being called.

Change the slider at the bottom of the left column in Xcode to show more of the stack frames if some are hidden.

Walt Sellers
  • 3,806
  • 30
  • 35
  • Yep, as mentioned in the comments above, I had the exception breakpoint set on the project, but it was not catching anything. There wasn't a meaningful stack, as best as I could tell, since it was just within the app main, as you indicated. I'm not sure about showing "more," haven't seen or tried that before. Perhaps tonight I'll play with that again. – shortstuffsushi Oct 08 '14 at 14:21