I am working on an app that shows all the features available in SwiftUI. As part of it, I wanted to display all the SF Symbols that are available. I was wondering if there was a way to do it easily (without needing to type up all the names/variations).
Thanks
You can copy them from SF Symbols app (cmd+A
to select all, and cmd+shift+c
to copy all the names, paste to a text file, and refactor the names to Image(systemName: "NAME")
easily.
Here is how it's possible. No warranty of any kind for this code on passing the App Store review process.
if let bundle = Bundle(identifier: "com.apple.CoreGlyphs"),
let resourcePath = bundle.path(forResource: "symbol_search", ofType: "plist"),
let plist = NSDictionary(contentsOfFile: resourcePath) {
/// keys in plist are names of all available symbols
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With