jessesquires / BButton

Twitter Bootstrap buttons for iOS
http://cocoadocs.org/docsets/BButton/
Other
712 stars 82 forks source link

Font not loaded when using Cocoapods frameworks #28

Closed chrisballinger closed 5 years ago

chrisballinger commented 9 years ago

I believe this is due to needing to dynamically load the font at runtime when including a font in a resource bundle. A quick workaround is to manually add FontAwesome.ttf to your project.

  1. http://www.mokacoding.com/2014/02/13/sharing-assets-with-cocoapods-resource-bundle-and-dynamically-loaded-fonts.html
  2. http://www.marco.org/2012/12/21/ios-dynamic-font-loading
jessesquires commented 9 years ago

hey @chrisballinger - for now you can add the font to your Info.plist

img

chrisballinger commented 9 years ago

Oh it already was manually added to the Info.plist from before I switched to use_frameworks!. The issue is that the "fonts provided by the application" thing only works for fonts in the main bundle, not in a resource bundle.

jessesquires commented 9 years ago

ahhh derp. :cry:

silvansky commented 9 years ago

Added FontAwesome.ttf to copy resources step in my project. This fixed the issue for a while in the cost of duplicating file.