Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework compatibility #3

Merged
merged 1 commit into from
Jan 1, 2015
Merged

Framework compatibility #3

merged 1 commit into from
Jan 1, 2015

Conversation

marcelofabri
Copy link
Contributor

OpenSans now works when it becomes a framework with CocoaPods 0.36.

Two steps were necessary (based on this CocoaPods blog post):

  • Used a system import (<OpenSans/UIFont+OpenSans.h>) to import the header.
  • Created a private class to load the font, as NSBundle +mainBundle needs to be replaced with NSBundle +bundleForClass:, but couldn't do it from a category.

OpenSans now works when it becomes a framework with CocoaPods 0.36.

Two steps were necessary (based on [CocoaPods blog post](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/):
- Used a system import (`<OpenSans/UIFont+OpenSans.h>`) to import the header
- Created a private class to load the font, as `NSBundle +mainBundle` needs to be replaced with `NSBundle +bundleForClass:`, but couldn't do it from a category.
@kylef
Copy link
Member

kylef commented Jan 1, 2015

Thanks @marcelofabri!

kylef added a commit that referenced this pull request Jan 1, 2015
@kylef kylef merged commit 0be3f18 into CocoaPods-Fonts:master Jan 1, 2015
@marcelofabri
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants