Swiftpack.co - WikipediaBrown/SFSymbols as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by WikipediaBrown.
WikipediaBrown/SFSymbols 0.1.6
This is an extension to UIImage that provides all of the SF Symbols for you as a UIImage.
⭐️ 2
🕓 1 week ago
.package(url: "https://github.com/WikipediaBrown/SFSymbols.git", from: "0.1.6")


Now Supporting SFSymbols 5

SFSymbols is a tiny package that provides extensions to String and UIImage to make using SFSymbols easy peasy. The extensions and the accompanying Enum are all generated using the python scripts included in this package along with a list of all of the SFSymbols names.


SFSymbols can be installed with Swift Package Manager.

Swift Package Manager (Xcode 12 or higher)

The preferred way of installing SFSymbols is via the Swift Package Manager.

  1. In Xcode, open your project and navigate to FileSwift PackagesAdd Package Dependency...
  2. Paste the repository URL (https://github.com/WikipediaBrown/SFSymbols.git) and click Next.
  3. For Rules, select Version (Up to Next Major) and click Next.
  4. Click Finish.

Adding Package Dependencies to Your App



You can use the String extension to get the name of all of the SFSymbols available. You can add an image like this

Image(systemName: .SFSymbols.plusApp)
    .aspectRatio(contentMode: .fit)


You can use the UIImage extension to get the image of all of the SFSymbols available. You can add an image like this

Image(uiImage: .SFSymbols.plusApp)
    .aspectRatio(contentMode: .fit)


Additionally, there is an enum that is CaseIterable that provides access to all of the strings in the String extension and access to all of the images through an image property.

Image(uiImage: SFSymbol.plusApp.image)
    .aspectRatio(contentMode: .fit)


Image(systemName: SFSymbol.plusApp.string)
    .aspectRatio(contentMode: .fit)


The scripts used to generate the extensions and enum are written in Python 2.7.18. Which means you'll need Python.

Get Python

Assuming you're running macOS, you should first install Homebrew and then use Homebrew to install Python by running the command brew install python.

Get List of Names

Get list of names of SFSymbols by opening the SFSymbols App (you can get it from  Developer) and paste it into the SFSymbols.txt file. Check out this StackOverflow post.

Run Python Scripts

Run the command python3 UIImageExtension.py && python3 UIImageExtensionTests.py && python3 StringExtension.py && python3 StringExtensionTests.py && python3 Enum.py and the python scripts will regenerate the extension and enum.


Run command+u to run the unit tests. Test are run automatically for all pull requests.


SFSymbols releases a new version on GitHub automatically when a pull request is approved from the develop branch to the master branch.


Send a pull request my dude... or make an issue.


Wikipedia Brown


SFSymbols is available under the MIT license. See the LICENSE file for more info.

Made with 🌲🌲🌲 in Cascadia


Stars: 2
Last commit: 1 week ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Super New actions
1 year ago

No changelog provided

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