Giter Club home page Giter Club logo

Comments (8)

thii avatar thii commented on May 19, 2024

May I see a sample of your Podfile and your code?

from fontawesome.swift.

natalia-osa avatar natalia-osa commented on May 19, 2024

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.

thii avatar thii commented on May 19, 2024

I could not replicate the error. You might want to do a clean build and/or delete all derived data.

from fontawesome.swift.

natalia-osa avatar natalia-osa commented on May 19, 2024

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.

thii avatar thii commented on May 19, 2024

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 ?, 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.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from fontawesome.swift.

natalia-osa avatar natalia-osa commented on May 19, 2024

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.

thii avatar thii commented on May 19, 2024

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.

natalia-osa avatar natalia-osa commented on May 19, 2024

Ok, so to sum up for anyone else seeking help with this issue, there are 2 ways to bypass the issue:

  1. Integrate it using Carthage instead of Cocoapods. The framework name in Carthage is FontAwesome.
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.