This is an outdated way of doing things. 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 in your Xcode project. Make sure to enable Copy items if needed and Create groups.
Usage
UIKit
To create an image:
let image = UIImage(.trash.circle)
If need with specific font, use this:
let image = UIImage(.plus, font: UIFont.preferredFont(forTextStyle: .body))
SwiftUI
To create an image:
Image(.trash.circle)
With a font:
Image(.plus)
.font(.body)
AppKit
To create an image:
let image = NSImage(.trash.circle)
If need with specific font, use this:
let image = NSImage(.plus, font: UIFont.preferredFont(forTextStyle: .body))
Apps Using
If you use a SafeSFSymbols, add your application via Pull Request.
SafeSFSymbols
Easy usage SF Symbols with static types. If symbol not available, compiler will show warning.
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:or adding it to the
dependencies
of yourPackage.swift
:CocoaPods:
This is an outdated way of doing things. 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
:Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put
Sources/SafeSFSymbols
folder in your Xcode project. Make sure to enableCopy items if needed
andCreate groups
.Usage
UIKit
To create an image:
If need with specific font, use this:
SwiftUI
To create an image:
With a font:
AppKit
To create an image:
If need with specific font, use this:
Apps Using
If you use a
SafeSFSymbols
, add your application via Pull Request.