Easy usage SFSymbols. If symbol not available, compiler will show warning.

Overview

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 is not available for your version of iOS/macOS/tvOS, the compiler will show a warning. Processed all symbols by script.

Installation

Ready for use on iOS 13+.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/ivanvorobei/SFSymbols", .upToNextMajor(from: "1.0.1"))
]

Manually

If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/SFSymbols folder in your Xcode project. Make sure to enable Copy items if needed and Create groups.

Usage

To create image:

let image = UIImage(.trash.circle)

If need with specific font, use this:

let image = UIImage(.plus, font: UIFont.preferredFont(forTextStyle: .body))

Russian Community

Я веду телеграм-канал, там публикую новости и туториалы.
С проблемой помогут в чате.

Видео-туториалы выклыдываю на YouTube:

Tutorials on YouTube

You might also like...
Skredvarsel app - an iOS, iPadOS, and macOS application that provides daily avalanche warnings from the Norwegian Avalanche Warning Service API
Skredvarsel app - an iOS, iPadOS, and macOS application that provides daily avalanche warnings from the Norwegian Avalanche Warning Service API

Skredvarsel (Avalanche warning) app is an iOS, iPadOS, and macOS application that provides daily avalanche warnings from the Norwegian Avalanche Warning Service API

GitHub Action for Swift with warning/error annotations.

GitHub Action for Swift This action executes Swift and generates github action annotations from swift warnings/errors. Usage An example to executing S

All the SFSymbols (1.1 & 2.0) at your fingertips

SFSymbol: SFSymbol and SFSymbol 2 All the SFSymbols at your fingertips (SFSymbol 1.1 & 2) Usage SFSymbol and SFSymbol2 are an enums that contain the i

A collection of additional custom SFSymbols for Swift
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

SFSymbols SwiftUI Enum
SFSymbols SwiftUI Enum

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

High readable code with SFSymbols
High readable code with SFSymbols

High-readable code with SFSymbols

Simple app to show usage of SwiftUI and Combine
Simple app to show usage of SwiftUI and Combine

Podcasts Simple app to show usage of SwiftUI and Combine. The app shows a list of podcasts fetched from listennotes and it can be played. Status: Work

Swiftbot on slack. Inspired by kishikawakatsumi/swift-compiler-discord-bot
Swiftbot on slack. Inspired by kishikawakatsumi/swift-compiler-discord-bot

Swiftbot Swiftbot on slack. Inspired by kishikawakatsumi/swift-compiler-discord-bot Usage $ swiftbot --token xoxb-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxx

Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!

LxDBAnything Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! Installation You only need drag LxD

A Swift package for encoding and decoding Swift Symbol Graph files.
A Swift package for encoding and decoding Swift Symbol Graph files.

SymbolKit The specification and reference model for the Symbol Graph File Format. A Symbol Graph models a module, also known in various programming la

A compiler, assembler and emulator for the QCPU 2 architecture

QCPU CLI A CLI for compiling Q-code, assembling extended QCPU 2 assembly and emulating machine code. Tags @PAGE upper lower @HEADER label argum

 AnimatedWaveform provides the user with an animated version of the waveform.circle SF Symbol in SwiftUI.
AnimatedWaveform provides the user with an animated version of the waveform.circle SF Symbol in SwiftUI.

AnimatedWaveform AnimatedWaveform is a Swift Package designed for SwiftUI. It provides the user with an animated version of the waveform.circle SF Sym

A reverse engineering tool to restore stripped symbol table and dump Objective-C class or Swift types for machO file.

A reverse engineering tool to restore stripped symbol table and dump Objective-C class or Swift types for machO file.

A Xcode plugin to add highlight to the instances of selected symbol.
A Xcode plugin to add highlight to the instances of selected symbol.

Auto Highlight Symbol About Xcode 8 Xcode 8 does't support plugins anymore, but there is a workaround, use at your own risk. Xcode can highlight insta

A compiler with very basic capabilities written in Swift

BasicCompiler A compiler with very basic capabilities written in Swift. This project is not intended for real-world use; it's implemented just for fun

compiler-driven, structured, type-safe source generation. never use gyb again!

factory 2022-09-10-a factory is a structured, type-safe source generation tool. It is intended to be a replacement for (and improvement over) the gyb

A simple Pebble app to show the nearest available CitiBike NYC dock.
A simple Pebble app to show the nearest available CitiBike NYC dock.

PebCiti A simple iOS app to show the nearest available CitiBike NYC dock on your Pebble. UUID: F6BB82D0-B5BF-4EC7-A97A-405D3A350444 Installation Open

Added functionality that system buttons are not easy to implement
Added functionality that system buttons are not easy to implement

LLCustomButton Added functionality that system buttons are not easy to implement What are the functions ? Sets the position and spacing of text and im

Comments
  • Default symbols are not enclosed via available attribute

    Default symbols are not enclosed via available attribute

    Details

    • iOS Version: 13-14
    • Framework Version: 1.0.5
    • Installed via: Cocoapods

    Describe the Bug

    Default symbols (without any extensions) are not enclosed via available attribute. Thus there are a lot of cases where custom UIImage's initializer public convenience init(_ symbol: SPSafeSymbol) will crash app by force-unwrapping the system image that doesn't exists at current iOS.

    For example: I want to display on iOS 13 a symbol named pills, that is available starting from iOS 14.

    I can do this without any error: let image = UIImage(.pills)

    And if we look into the Pills (file SPSafeSymbol+Pills) extension we will see that pills doesn't enclose via available attribute.

    extension SPSafeSymbol {
    
    	public static var pills: Pills { .init(name: "pills") }
    
    	open class Pills: SPSafeSymbol {
    
    		@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
    		open var circle: SPSafeSymbol { ext(.start.circle) }
    		@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
    		open var circleFill: SPSafeSymbol { ext(.start.circle.fill) }
    
    		@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
    		open var fill: SPSafeSymbol { ext(.start.fill) }
    	}
    }
    
    bug 
    opened by itShouldWork 5
Owner
Ivan Vorobei
iOS Developer
Ivan Vorobei
Compatible backports of commonly used type properties for `URL` that are only available from iOS 16.0+ / macOS 13.0+ / tvOS 16.0+ / watchOS 9.0+.

URLCompatibilityKit URLCompatibilityKit is a lightweight Swift package that adds compatible backports of commonly used type properties, type and insta

Marco Eidinger 17 Dec 8, 2022
A small app that uses the private FlightUtilities.framework to show information about any flight.

FlightUtilities A small app that uses the private FlightUtilities.framework to show information about any flight given the airline code, flight code a

Patrick Balestra 31 Dec 20, 2022
ChidoriMenu - An easy way to add menus visually similar to iOS 14's Pull Down and Context Menus but with some added benefits

ChidoriMenu ?? ⚡️ An easy way to add popover menus visually similar to the Conte

Christian Selig 152 Dec 12, 2022
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
Show the confetti only when the user is having fun, and if not having fun, don't show it.

SPConfetti - A simple solution to show the confetti to the user. Smoothly starts and stops. Allow set multiply diffrent particles at once. You can chang

Ivan Vorobei 225 Dec 30, 2022
Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

Apple 833 Jan 3, 2023
Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Not Apple Autolayout wrapper. Provides placeholders. Linux support.

CGLayout Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Has cross-hierarchy coordinate space. Implemen

Koryttsev Denis 45 Jun 28, 2022
A replacement for as which runs in constant time instead of O(n) when the conformance is not satisfiedA replacement for as which runs in constant time instead of O(n) when the conformance is not satisfied

ZConform A replacement for as? which runs in constant time instead of O(n) when the conformance is not satisfied. How it works ZConform does a one-tim

Emerge Tools 20 Aug 4, 2022
This is my first SwiftUI project, as I decided not to release it I made the codebase available here for anyone to take a look at.

Sunshine This is my first SwiftUI project, as I decided not to release it to the App Store. I made the codebase available here for anyone to take a lo

Maxime Heckel 20 Dec 14, 2022
Warning pushNotification - Using push notification with Firebase Cloud Messaging

재난문자 푸시 알림 구현 1) 구현 기능 2) 기본 개념 (1) Remote Notification 불시에 발생한 업데이트 불특정 시간 예측 불

null 0 Jan 24, 2022