Reputation: 2330
I've added a custom font TTF file to an app I'm making.
I've also added the UIAppFonts
key to the plist, as required.
Now, when I launch the app, it hits the "app is crashing in AppDelegate" breakpoint we all know so well.
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.
Upvotes: 3
Views: 3422
Reputation: 3939
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.
Upvotes: 1
Reputation: 3824
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
Upvotes: 2