GithubHelp home page GithubHelp logo

xnth97 / symbolpicker Goto Github PK

View Code? Open in Web Editor NEW
134.0 4.0 23.0 4.93 MB

A simple and cross-platform SFSymbol picker for SwiftUI

License: MIT License

Swift 100.00%
ios swift swiftui uicomponent uikit sfsymbols tvos macos watchos

symbolpicker's Introduction

Hi there ๐Ÿ‘‹

I'm Yubo, an iOS engineer at TikTok (ByteDance), previously LinkedIn, Yahoo and Ant Financial.

linkedin tweet ps xbox steam

Skills

My Skills

Tech facts

  • I write Swift and Objective-C daily, sometimes Java and JavaScript
  • Also write some Go, TypeScript and Python
  • Flutter is good, but at what cost

Most Used Languages

symbolpicker's People

Contributors

ensan-hcl avatar lakr233 avatar lucaszischka avatar xnth97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

symbolpicker's Issues

This is how to get the SF Symbols programatically

Hi thanks for making your library,

If you want to programmatically obtain the list of symbols, here you go. It's not a complete example because I didn't handle the category, but they are in the bundle. I figure that it is feasible to get them.

They are located in this bundle: /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/

More specifically, in this file: name_availability.plist.

// Read the content of CoreGlyphs
// /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework

var symbols = [String]()
if let bundle = Bundle(identifier: "com.apple.CoreGlyphs"),
   let resourcePath = bundle.path(forResource: "name_availability", ofType: "plist"),
   let plist = NSDictionary(contentsOfFile: resourcePath),
   let plistSymbols = plist["symbols"] as? [String: String]
{
  symbols = Array(plistSymbols.keys)
}

Support for Categories

Thanks a lot for this Swift package!

Do you plan to support categories? Would be awesome to have categorised symbols maybe by adding an option menu on top of the view.

This issue is also very interesting and could help to solve the issue:
#8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.