All the SFSymbols (1.1 & 2.0) at your fingertips

Overview

SFSymbol: SFSymbol and SFSymbol 2

Build Status Swift 5.3 Swift Package Manager compatible CocoaPods compatible Carthage compatible License

All the SFSymbols at your fingertips (SFSymbol 1.1 & 2)

Usage

SFSymbol and SFSymbol2 are an enums that contain the identifier strings of all of apple's SFSymbol and SFSymbol2.

For example SFSymbol.playCircle produces the String "play.circle" that can then be used to instantiate a system symbol via:

UIKit

    UIImage(symbol: .playCircle)

or

SwiftUI

    Image(symbol: .playCircle)

About

SFSymbols (1.1 and 2) is a real treat from apple, Apple's official list of Symbols that are available to use free of charge when writing software on any of Apple's recent platforms. There is one downfall however, it is a pain in the neck to look up exact symbol names, take for example:

"square.and.line.vertical.and.square.fill"

That is a long string to remember and digging through the catalog of SF Symbols to find in would be quite a waste of time.

Wouldn't it be easier if you could just use code completion?

Thats what this super micro library aims to do.

Installation

Swift Package Manager (Preferred)

Since Xcode integrated swift package manager natively into the IDE you can add SFSymbol simply by:

File-> Swift Packages -> Add Package Dependency...

when prompted to enter a package URL paste:

https://github.com/Nirma/SFSymbol

and click next & finish to automagically install SFSymbol through Xcode & SPM!

Manual

Don't want that additional third party dependency? Then just simply copy over the file SFSymbol.swift into your project's appropriate folder!

Cocoapods

Just add this line to your podfile:

pod 'SFSymbol'

Carthage

github "Nirma/SFSymbol"

Contributing to this project

Contributions are highly welcome

If there is something you wish to fix about the project, or wish to add any other kind of enhancements, propose to add to the project. Please feel free to send over a pull request or open an issue for this project.

License

SFSymbol is released under the MIT license. See LICENSE for details.

Comments
  • SF Symbols 2.0 added ✅

    SF Symbols 2.0 added ✅

    SF Symbols 2.0 added

    • Includes an enum named SFSymbols2 with 800 cases of new symbols.

    • isMulticolor computed property added to the enum.

    • all extensions are enclosed under iOS14 available condition.

    • added respective UIIMage and Image extension to use these.

    • Aaryan Kothari

    opened by aaryankotharii 3
  • Removed convince initializers

    Removed convince initializers

    Since this is a first party image solution by Apple, there is no need to have it use convince initializers. Additionally, because there is a test case for all symbols we know they all work.

    opened by Rspoon3 2
  • Addiitonal Xcode 12 Swift Compiler errors

    Addiitonal Xcode 12 Swift Compiler errors

    Screen Shot 2020-07-29 at 10 14 53 AM

    Basically, you have specified tvOSv11 support in the Package.swift, but have conditionals only for iOSv13....need to add tvOSv13 conditionals as well.

    opened by ehlersd 2
  • Fix compiler error when linking against watchOS target

    Fix compiler error when linking against watchOS target

    Sets watchOS platform version to at least watchOS 6, such that it can be linked against watchOS targets.

    Previously, as there was no minimum SDK specified, it would attempt to compile and link against all watchOS SDKs. As SFSymbol initialisers for Image and UIImage were introduced in watchOS 6, the package would fail to compile and link against watchOS targets.

    This is akin to PRs created by other contributors for patching compiler errors for iOS and tvOS.

    opened by OhItsShaun 1
  • Category upgrade

    Category upgrade

    "Category" is a very generic model name that someone might have in a project. By having it as an extension of SFSymbol users won't run into a conflict issue.

    Additionally it now provides a nicer call site.

    struct ContentView: View {
        var body: some View {
            Text(SFSymbol.Category.shapes.symbols.count.description)
                .padding()
        }
    }
    
    opened by Rspoon3 1
  • Unable to build on 14

    Unable to build on 14

    Unable to build on iOS 14.0 in Xcode beta 2 with SFSymbol 0.30 via SPM. I was able to build with 0.20, but now I receive the following errors.

    Swift Compiler Error

    1. SFSymbol/UIImage+SFSymbol.swift:15:61: 'Configuration' is only available in iOS 13.0 or newer SFSymbol/UIImage+SFSymbol.swift:15:17: Add @available attribute to enclosing initializer SFSymbol/UIImage+SFSymbol.swift:11:8: Add @available attribute to enclosing extension

    2. SFSymbol/UIImage+SFSymbol.swift:13:14: 'init(systemName:)' is only available in iOS 13.0 or newer SFSymbol/UIImage+SFSymbol.swift:13:14: Add 'if #available' version check SFSymbol/UIImage+SFSymbol.swift:12:17: Add @available attribute to enclosing initializer SFSymbol/UIImage+SFSymbol.swift:11:8: Add @available attribute to enclosing extension

    3. SFSymbol/UIImage+SFSymbol.swift:16:14: 'init(systemName:withConfiguration:)' is only available in iOS 13.0 or newer SFSymbol/UIImage+SFSymbol.swift:16:14: Add 'if #available' version check SFSymbol/UIImage+SFSymbol.swift:15:17: Add @available attribute to enclosing initializer SFSymbol/UIImage+SFSymbol.swift:11:8: Add @available attribute to enclosing extension

    image

    I added an iOS 13 availability check UIImage+SFSymbol.swift, and it now builds as expected.

    opened by kernjackson 1
  • Add public modifiers, isRestricted getter and Category enum.

    Add public modifiers, isRestricted getter and Category enum.

    Add public access modifier in front of extensions so extensions are available outside the package. Add isRestricted getter that can be used to check if the SFSymbol can be used or not. Since some symbols are apple only. ( !SFSymbol.aCircle.isRestricted ? use : don’t use ) Add Category enum that groups all the SFSymbols in categories. (Big feature) Category.devices.symbols()

    opened by manass-sharma-1683 1
  • Add extensions for UIImage and Image.

    Add extensions for UIImage and Image.

    Initializers for UIImage and Image so something like this can be done: imageView.image = UIImage(symbol: .aCircle) instead of: imageView.image = UIImage(systemName SFSymbol.aCircle.rawValue)

    opened by manass-sharma-1683 1
  • macOS 11 @available for initializers

    macOS 11 @available for initializers

    SF Symbols can only be used for macOS 11 and up, as 10.15 lacked the initializer.

    This pull request adds necessary tags to ensure that things only work for 11 and up.

    I have also added NSImage convenience initialisers, as well as tests for macOS.

    opened by vincentneo 0
  • NSImage init(...) is unavailable in Mac Catalyst

    NSImage init(...) is unavailable in Mac Catalyst

    The project can not be used with a Mac Catalyst application. There is an error in NSImage+SFSymbol.swift.

    'init(systemSymbolName:accessibilityDescription:)' is unavailable in Mac Catalyst

    opened by honkmaster 1
  • missing symbols

    missing symbols

    I've noticed that some symbols don't work, and apparently the name for most appears to be changed.

    I am assuming this (sfsymbols 2) was generated around beta times and things changed from Apple's side slightly, since.

    This pull request doesn't fix all missing though. I can't find a replacement for 'translate'. All are currently replaced by closest based on name with latest SFSymbols 3 beta app.

    case names are not updated too.

    Some newer symbols from 2.1 isn't in too.

    opened by vincentneo 0
Releases(2.0.0)
  • 2.0.0(Oct 30, 2022)

    Summary

    This release restructures the enums for SFSymbols(4-1) that use nested enums to break up the data structure and make it easier to drill down for the specific symbol identifier you are searching for.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Aug 22, 2021)

  • 1.0.0(Aug 23, 2020)

    Summary

    This release includes support for SFSymbol 2 glyphs.

    Please use the SFSymbol2 enum for SFSymbol 2 identifiers and SFSymbol for SFSymbol 1.1 identifiers.

    https://developer.apple.com/sf-symbols/

    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jul 30, 2020)

  • 0.5.0(Jul 17, 2020)

    Summary

    This release just simply adds the same functionality that this library added to UIKit's UIImageView.

    Now you can create Images from SFSymbols in SwiftUI with a line of code like this:

        Image(symbol: .playCircle)
    
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jul 15, 2020)

  • 0.3.0(Jul 11, 2020)

  • 0.2.0(Nov 4, 2019)

  • 0.1.0(Oct 28, 2019)

Owner
Nicholas Maccharoli
Day job is iOS / Swift dev mostly, Python and Golang enthusiast. Coding with love since 2007.
Nicholas Maccharoli
Use FontAwesome in your Swift projects

FontAwesome.swift Use Font Awesome in your Swift projects To see the complete set of 3,978 icons in Font Awesome 5, please check the FontAwesome.com s

Thi Doãn 1.6k Dec 30, 2022
Programmatically load custom fonts into your iOS and tvOS app.

FontBlaster Programmatically load custom fonts into your iOS and tvOS app. About Say goodbye to importing custom fonts via property lists as FontBlast

Arthur Ariel Sabintsev 1.1k Jan 3, 2023
Use Ionicons in your Swift projects.

IoniconsKit IoniconsKit internally use ionicons.ttf v2.0.1 Example To run the example project, clone the repo, and run pod install from the Example di

Keita Oouchi 313 Dec 8, 2022
Use Octicons in your Swift projects.

OcticonsKit OcticonsKit internally use octicons.ttf v4.3.0 Example To run the example project, clone the repo, and run pod install from the Example di

Keita Oouchi 52 Jan 31, 2022
SwiftUIFontIcon The easiest way to implement font icons in your SwiftUI project.

SwiftUIFontIcon The easiest way to implement font icons in your SwiftUI project. Usage The library is super super easy to use, just something like thi

Bui Dac Huy 81 Dec 27, 2022
Use 1600+ icons (and more!) from FontAwesome and Google Material Icons in your swift/iOS project in an easy and space-efficient way!

Swicon Use 1600+ icons from FontAwesome and Google Material Icons in your iOS project in an easy and space-efficient way! The built-in icons are from

Zhibo 39 Nov 3, 2022
A collection of additional custom SFSymbols for Swift

MoreSFSymbols A collection of additional custom SFSymbols for Swift Content Usage Symbols Developer Logos Contributing Licence Usage iOS 15.0: Downloa

Cameron Shemilt 57 Dec 2, 2022
SFSymbols SwiftUI Enum

SF SFSymbols SwiftUI Enum Example: All lines are equivalent. Image(systemName: "square.fill.and.line.vertical.square.fill") Image(systemName:

Zach Eriksen 34 Oct 24, 2022
Easy usage SFSymbols. If symbol not available, compiler will show warning.

SFSymbols Wrapper of SFSymbols. You choose the icon and what style to draw it in. You can specify the font with which to draw the icon. If the symbol

Ivan Vorobei 99 Jan 2, 2023
Easy usage SFSymbols with static types. If symbol not available, compiler will show warning.

SPSafeSymbols Wrapper of SF Symbols. You choose the icon and what style to draw it in. You can specify the font with which to draw the icon. If the sy

Sparrow Code 96 Nov 15, 2022
High readable code with SFSymbols

High-readable code with SFSymbols

Yusuke Hosonuma 12 Oct 8, 2022
Xcode-developer-disk-image-all-platforms - A repo which shares all developer disk images for iOS, tvOS, watchOS

Disclaimer: The available resources and files from this repo are uploaded from many contributors. The files are unverified, untested, and could have n

Hai K 253 Dec 21, 2022
Pegase is a beautifully easy tool to keep track of your financial life on all your macOS

Pegase ?? Features ?? Documentation Personal account software Pegase is a beautifully easy tool to keep track of your financial life on all your macOS

null 2 Oct 12, 2021
iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.

iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.While the cost of storage seems expensive in comparison to other online storage services, its advantage is that it works natively across all your devices.

MindInventory 12 Jul 29, 2022
PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. PGPro is made in Switzerland.

PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. P

Luca Näf 250 Jan 4, 2023
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Dec 31, 2022
Zephyr synchronizes specific keys and/or all of your UserDefaults over iCloud using NSUbiquitousKeyValueStore.

Zephyr ??️ Effortlessly sync UserDefaults over iCloud About Zephyr synchronizes specific keys and/or all of your UserDefaults over iCloud using NSUbiq

Arthur Ariel Sabintsev 845 Jan 6, 2023
LicensePlist is a command-line tool that automatically generates a Plist of all your dependencies, including files added manually

LicensePlist is a command-line tool that automatically generates a Plist of all your dependencies, including files added manually(specifi

Masayuki Ono (mono) 2.2k Dec 29, 2022
An iOS picker view to serve all your "picking" needs

Mandoline The PickerView is a UICollectionView that provides a smooth "picking" interface. In order to get the most out of it, a consuming view contro

Blue Apron 883 Nov 28, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Jan 3, 2023