FontAwesomeKit: 'Font file doesn't exist' error

I’m getting a weird error - looks like the fonts aren’t being registered properly? Doing this in my AppDelegate as a workaround as detailed in KnownIssues

#import <FontAwesomeKit/FontAwesomeKit.h>

@implementation IATAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FAKFontAwesome iconFontWithSize:1];
  [FAKFoundationIcons iconFontWithSize:1];
  [FAKIonIcons iconFontWithSize:1];

  return YES;
}

@end
2014-08-05 18:41:42.958 Visit[74417:60b] *** Assertion failure in +[FAKFontAwesome registerIconFontWithURL:], /Users/jon/code/Visit/Pods/FontAwesomeKit/FontAwesomeKit/FAKIcon.m:14
2014-08-05 18:41:42.962 Visit[74417:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Font file doesn't exist'
*** First throw call stack:
(
    0   CoreFoundation                      0x032781e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x02f5a8e5 objc_exception_throw + 44
    2   CoreFoundation                      0x03278048 +[NSException raise:format:arguments:] + 136
    3   Foundation                          0x0115a4de -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
    4   Visit                               0x001c1572 +[FAKIcon registerIconFontWithURL:] + 370
    5   Visit                               0x001a3548 __35+[FAKFontAwesome iconFontWithSize:]_block_invoke + 152
    6   libdispatch.dylib                   0x038264d0 _dispatch_client_callout + 14
    7   libdispatch.dylib                   0x03815e12 dispatch_once_f + 184
    8   libdispatch.dylib                   0x03815d55 dispatch_once + 31
    9   Visit                               0x001a333d +[FAKFontAwesome iconFontWithSize:] + 173
    10  Visit                               0x0000371f -[IATAppDelegate application:didFinishLaunchingWithOptions:] + 2543
    11  UIKit                               0x019e514f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
    12  UIKit                               0x019e5aa1 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1810
    13  UIKit                               0x019ea667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
    14  UIKit                               0x019fef92 -[UIApplication handleEvent:withNewEvent:] + 3517
    15  UIKit                               0x019ff555 -[UIApplication sendEvent:] + 85
    16  UIKit                               0x019ec250 _UIApplicationHandleEvent + 683
    17  GraphicsServices                    0x04272f02 _PurpleEventCallback + 776
    18  GraphicsServices                    0x04272a0d PurpleEventCallback + 46
    19  CoreFoundation                      0x031f3ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    20  CoreFoundation                      0x031f39db __CFRunLoopDoSource1 + 523
    21  CoreFoundation                      0x0321e68c __CFRunLoopRun + 2156
    22  CoreFoundation                      0x0321d9d3 CFRunLoopRunSpecific + 467
    23  CoreFoundation                      0x0321d7eb CFRunLoopRunInMode + 123
    24  UIKit                               0x019e9d9c -[UIApplication _run] + 840
    25  UIKit                               0x019ebf9b UIApplicationMain + 1225
    26  Visit                               0x00002cfd main + 141
    27  libdyld.dylib                       0x03a5b701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

I run into the same problem, here is how I solved it.

  1. Build Phases - > Copy Bundle Resources -> ‘+’ -> Add Others -> Select the “FontAwesome.otf” file
  2. Clean Project(“CMD + SHIFT + K”)
  3. Build and run.

@tomoyuki28jp you should be using the following as of cocoapod 1.0, cheers

pod 'FontAwesomeKit/FontAwesome', :git => 'https://github.com/PrideChung/FontAwesomeKit.git'