Comments (8)
May I see a sample of your Podfile and your code?
from fontawesome.swift.
Here is the Podfile:
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
pod 'Fabric'
pod 'Crashlytics'
#etc....
target 'MyApp' do
pod 'FontAwesome.swift'
end
target 'MyAppTests' do
pod 'Quick', '~> 0.9'
pod 'Nimble', '~> 4.0'
#etc...
end
target 'MyAppUITests' do
#etc...
end
And here is the code usage:
textField.leftView = UIImageView(image: UIImage.fontAwesomeIconWithName(.FileTextO, textColor: UIColor.blackColor(), size: CGSizeMake(20, 20)))
While performing pod install
there is the information which version is installed == 0.7.3.
from fontawesome.swift.
I could not replicate the error. You might want to do a clean build and/or delete all derived data.
from fontawesome.swift.
That was the first thing I've tried, unfortunately didn't help. It seems that my custom script (quite common in fact) is taking part in generating the issue:
if [ "${CONFIGURATION}" = "Debug" ]; then
TAGS="MYToDo:|MYFixMe:|MYHack:|MYTemp:|MYWarn:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
fi
I have flag treatWarningsAsErrors
turned to true
, so this is how I declare temporary hacks/warnings/todos. As far as I saw, it's quite a common scenario, so there may be more people experiencing it. Here the script tries to iterate by .swift
files, and your project is ending with .swift
, so it displays an error. What is worse, it will work like this for all greps not only such one.
Ofc, changing 4th line to find "${SRCROOT}/ProjectName/Code"
clears the warning, as Pods folder is not browsed then, but that's more like a workaround than real fix.
Anyway, it seems that something gets installed incorrectly:
button.setTitle(String.fontAwesomeIconWithName(.FileTextO), forState: .Normal)
-> displays box with ?
, while
let button = UIButton(type: .System)
textField.leftView = UIImageView(image: UIImage.fontAwesomeIconWithName(.FileTextO, textColor: UIColor.mfDefaultBlueColor, size: CGSizeMake(20, 20)))
-> displays the icon correctly.
I'm not sure whether this is a kind of bug or it's a known issue or that's because of install error quoted in first post under this issue.
from fontawesome.swift.
You forgot to set font for your button's titleLabel.
On Jun 6, 2016, at 7:48 PM, Natalia [email protected] wrote:
That was the first thing I've tried, unfortunately didn't help. It seems that my custom script (quite common in fact) is taking part in generating the issue:
if [ "${CONFIGURATION}" = "Debug" ]; then
TAGS="MYToDo:|MYFixMe:|MYHack:|MYTemp:|MYWarn:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" ( -name ".swift" ) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).$" | perl -p -e "s/($TAGS)/ warning: $1/"
fi
I have flag treatWarningsAsErrors turned to true, so this is how I declare temporary hacks/warnings/todos. As far as I saw, it's quite a common scenario. Here it tries to iterate by .swift files, and your project is ending with .swift, so it displays an error. What is worse, it will work like this for all greps not only such one.Anyway, it seems that something gets installed incorrectly:
button.setTitle(String.fontAwesomeIconWithName(.FileTextO), forState: .Normal)
-> displays box with ?, whilelet button = UIButton(type: .System)
textField.leftView = UIImageView(image: UIImage.fontAwesomeIconWithName(.FileTextO, textColor: UIColor.mfDefaultBlueColor, size: CGSizeMake(20, 20)))
-> displays the icon correctly.I'm not sure whether this is a kind of bug or it's a known issue or that's because of install error quoted in first post under this issue.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
from fontawesome.swift.
Probably I'll go with attributedText then.
Anyway, coming back to grep problem. It isn't a huge issue, because we can always change search paths, like I've written, so if you want you're welcome to close the issue. Or if you find it disturbing you can investigate the issue ;). Just having folder named FontAwesome_swift
instead of FontAwesome.swift
would fix it.
from fontawesome.swift.
There is no folder named FontAwesome.swift
in this project. CocoaPods makes it based on the pod name. The only way to fix it is creating a new podspec and deprecate the current one but I wouldn't do it at the moment.
I suggest you to integrate it using Carthage. The framework name in Carthage is just FontAwesome
.
from fontawesome.swift.
Ok, so to sum up for anyone else seeking help with this issue, there are 2 ways to bypass the issue:
- Integrate it using Carthage instead of Cocoapods. The framework name in Carthage is
FontAwesome
. - Change search script so it begins on your own code instead of root folder (like in 5th post).
I totally agree deprecating the project because of such small detail is without any sense. Thanks for your help.
from fontawesome.swift.
Related Issues (20)
- FontAwesome icon displayed as question mark - Swift
- Watch OS Support HOT 7
- icon + text = text becomes icon if text match icon name HOT 5
- Support coming for FontAwesome v5.13.1 HOT 15
- FA.swift showing strange icons after update HOT 4
- Cocoapods Says latest version 5.14.0 HOT 7
- used to work now completely broken HOT 2
- [iOS] Some images show question mark instead of actual icon HOT 3
- Retrieve image not work HOT 2
- update Enum file to include pro codes HOT 3
- xCode13 CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
- Navigation bar button with correct FA icon size
- FontAwsome Pro HOT 1
- Swift icons showing as Question Marks HOT 1
- Nil fontName leads to crash HOT 1
- FontAwesome 6.1 HOT 2
- Swift error HOT 1
- Request to bump iOS deployment target for Xcode 14.X build HOT 1
- New release? HOT 7
- Any support of Privacy Manifest? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontawesome.swift.