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

Added Swift package support #57

Merged
merged 22 commits into from
Oct 8, 2021
Merged

Conversation

sarathsarah
Copy link
Contributor

Added Swift package support tested in Same project as well.

@sarathsarah
Copy link
Contributor Author

@rafiki270 Please take a look and review it.

@lozhuf
Copy link
Contributor

lozhuf commented Oct 4, 2021

Unfortunately there seems to be a problem with loading AwesomePro fonts. In Fonts.swift line 105 & 123, the use of Bundle.module leads to the NSBundle being <myApp>.app/Awesome_Awesome.bundle, even though the pro font resource files are saved to Bundle.main.

@sarathsarah
Copy link
Contributor Author

is it crashing? I got crash while accessing Font.load() in NSAttributedString+Awesome line 21. Thats why I added Bundle.module there.

@lozhuf
Copy link
Contributor

lozhuf commented Oct 6, 2021

It crashes if you try to use the pro font after loading it. The load will just fail silently if it can't find the pro fonts. The issue is that the pro files are in Bundle.main, while the regular font files are in Bundle.module. I believe you need to use Bundle.module only if the passed in bundle is nil, and it's AwesomeSPM.

…and use the system defined `SWIFT_PACKAGE` setting rather than the custom `AwesomeSPM` setting.
@lozhuf
Copy link
Contributor

lozhuf commented Oct 8, 2021

I have just fixed this issue here: sarathsarah#1

Fix loading of AwesomePro fonts by letting the user pick the bundle
@sarathsarah
Copy link
Contributor Author

@lozhuf Merged your PR. and Thanks ;)

Copy link
Collaborator

@rafiki270 rafiki270 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please remove the .swiftpm folder from the commits please? Adding it to the .gitignorefile would be best please

@sarathsarah
Copy link
Contributor Author

Adding .swiftpm to .gitignore will create issue isn't it?

@rafiki270 rafiki270 merged commit dd685ce into LiveUI:master Oct 8, 2021
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.

3 participants