Swiftpack.co - sparrowcode/SafeSFSymbols as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by sparrowcode.
sparrowcode/SafeSFSymbols 2.0.1
Safe access SFSymbols. If symbol not available, will show warning.
⭐️ 172
🕓 13 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/sparrowcode/SafeSFSymbols.git", from: "2.0.1")

SafeSFSymbols

Safe access SFSymbols. If symbol not available, will show warning.

// Replace this
UIImage(systemName: "star.fill") 
// to this
UIImage(.star.fill)

iOS Dev Community

Navigate

Installation

Ready to use on iOS 13+, tvOS 13+ & watchOS 6+.

Swift Package Manager

In Xcode go to Project -> Your Project Name -> Package Dependencies -> Tap Plus. Insert url:

https://github.com/sparrowcode/SafeSFSymbols

or adding it to the dependencies of your Package.swift:

dependencies: [
    .package(url: "https://github.com/sparrowcode/SafeSFSymbols", .upToNextMajor(from: "2.0.1"))
]

CocoaPods:

This is an outdated way. I advise you to use SPM. However, I will continue to support Cocoapods for some time.

Cocoapods Instalation

CocoaPods is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your Podfile:

pod 'SafeSFSymbols'

Manually

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

Usage

UIKit

let image = UIImage(.trash.circle)

SwiftUI

Image(.trash.circle)

AppKit

let image = NSImage(.trash.circle)

GitHub

link
Stars: 172
Last commit: 13 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Update to support v91 build with localised numerics.
13 weeks ago

Update to support v91 build with localised numerics.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics