Closed fxioi closed 8 years ago
The font file must be added to your Copy Bundle resources phase, I'm guessing its not correctly added.
Thanks,
Cory Smith http://ca.linkedin.com/in/corysmith/ http:/twitter.com/smixx http://twitter.com/smixx
On Wed, Oct 21, 2015 at 8:23 AM, 小付 notifications@github.com wrote:
hi, everybody I configured according to "Getting started - iOS" for my project. but Xcode prompt me "'Font file doesn't exist'" Sorry for my poor english...XD
Oct 21 20:47:43 TestProject[2035]
: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Oct 21 20:47:43 TestProject[2035] : CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Oct 21 20:47:43 TestProject[2035] : CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 2015-10-21 20:47:44.519 [info][tid:com.facebook.React.JavaScript] 'Running application "TestProject" with appParams: {"rootTag":1,"initialProps":{}}. DEV === true, development-level warning are ON, performance optimizations are OFF' 2015-10-21 20:47:44.542 [warn][tid:com.facebook.React.JavaScript] 'Warning: Failed propType: Invalid prop tintColor
of typenumber
supplied toSMXTabBar
, expectedstring
. Check the render method ofSMXTabBarIOS
.' 2015-10-21 20:47:44.544 [warn][tid:com.facebook.React.JavaScript] 'Warning: Failed propType: Invalid propbarTintColor
of typenumber
supplied toSMXTabBar
, expectedstring
. Check the render method ofSMXTabBarIOS
.' 2015-10-21 20:47:44.567 TestProject[2035:99173] * Assertion failure in +[FAKIonIcons registerIconFontWithURL:], /Users/lyfu/codes/rn/TestProject/node_modules/react-native-icons/ios/ReactNativeIcons/Libraries/FontAwesomeKit/FAKIcon.m:14 2015-10-21 20:47:44.569 TestProject[2035:99173] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Font file doesn't exist' * First throw call stack: ( 0 CoreFoundation 0x000000010a870f65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000109a71deb objc_exception_throw + 48 2 CoreFoundation 0x000000010a870dca +[NSException raise:format:arguments:] + 106 3 Foundation 0x00000001096bfae2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 TestProject 0x00000001092bfbd9 +[FAKIcon registerIconFontWithURL:] + 409 5 TestProject 0x00000001092703ff 32+[FAKIonIcons iconFontWithSize:]_block_invoke + 143 6 libdispatch.dylib 0x000000010df3349b _dispatch_client_callout + 8 7 libdispatch.dylib 0x000000010df1ee28 dispatch_once_f + 543 8 TestProject 0x00000001092701a6 +[FAKIonIcons iconFontWithSize:] + 150 9 TestProject 0x00000001092bfda7 +[FAKIcon iconWithCode:size:] + 183 10 TestProject 0x0000000109276474 +[FAKIonIcons iosHomeOutlineIconWithSize:] + 52 11 CoreFoundation 0x000000010a75f85c _invoking** + 140 12 CoreFoundation 0x000000010a75f6ae -[NSInvocation invoke] + 286 13 TestProject 0x0000000109286940 -[SMXTabBarItemManager loadIconImageUsingJSON:view:] + 2144 14 TestProject 0x0000000109286eaa 57-[SMXTabBarItemManager set_icon:forView:withDefaultView:]_block_invoke + 58 15 libdispatch.dylib 0x000000010df12ef9 _dispatch_call_block_and_release + 12 16 libdispatch.dylib 0x000000010df3349b _dispatch_client_callout + 8 17 libdispatch.dylib 0x000000010df19988 _dispatch_queue_drain + 2215 18 libdispatch.dylib 0x000000010df18ea9 _dispatch_queue_invoke + 601 19 libdispatch.dylib 0x000000010df1baf2 _dispatch_root_queue_drain + 1420 20 libdispatch.dylib 0x000000010df1b561 _dispatch_worker_thread3 + 111 21 libsystem_pthread.dylib 0x000000010e2644f2 _pthread_wqthread + 1129 22 libsystem_pthread.dylib 0x000000010e262375 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException— Reply to this email directly or view it on GitHub https://github.com/corymsmith/react-native-icons/issues/123.
@corymsmith gracias por responder~~
Add the font files you want to use into the Copy Bundle Resources build phase of your project
(click the '+' and click 'Add Other...' then choose the font files from node_modules/
react-native-icons/ios/ReactNativeIcons/Libraries/FontAwesomeKit).
i do 'Copy Bundle Resources' in Xcode, then the 'FontAwesomeKit' dir be referenced in Xcode, and if i choose 'copy if you need' in this step, the 'FontAwesomeKit' dir will be copied to the xcode project folder.
I think it must be something wrong,But I don't know How to do... (☍﹏⁰)。
@fuxiao126 Are you still having issues?
You only have to add the .otf or .ttf files
@fuxiao126 Don't select 'Copy files if needed'. Closing this for now, if you still have issues we can re-open
@corymsmith thanks for your help! i will try it tonight. :)
hi, everybody I configured according to "Getting started - iOS" for my project. but Xcode prompt me "'Font file doesn't exist'" Sorry for my poor english...XD