Get list of SF Symbol names in code

Hi. How do I get a list of all the available SF Symbol names from iOS using Swift code?

I don't know if there is an API for this.

The complete list is available on various websites, such as h t t p s : / / sfsymbols.com

Or use Apple SF Symbols app to copy all of them

https://stackoverflow.com/questions/63309862/way-to-easily-show-all-sf-symbols-icon-in-apps

You could also see this solution (posted 3 years ago):

https://developer.apple.com/forums/thread/110059

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

}
Get list of SF Symbol names in code
 
 
Q