{"id":25743858,"url":"https://github.com/leoho0722/swifthelpers","last_synced_at":"2026-06-20T04:31:12.896Z","repository":{"id":175282860,"uuid":"653261289","full_name":"leoho0722/SwiftHelpers","owner":"leoho0722","description":"Use Swift to create some amazing things!","archived":false,"fork":false,"pushed_at":"2024-11-04T16:35:56.000Z","size":1151,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T18:53:39.539Z","etag":null,"topics":["ios","macos","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/leoho0722/SwiftHelpers","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoho0722.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-13T17:55:30.000Z","updated_at":"2024-11-04T16:36:00.000Z","dependencies_parsed_at":"2023-10-01T20:31:51.113Z","dependency_job_id":"c637c4e9-159b-4fc9-9d8f-bab4372630d0","html_url":"https://github.com/leoho0722/SwiftHelpers","commit_stats":null,"previous_names":["leoho0722/swifthelpers"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/leoho0722/SwiftHelpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSwiftHelpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSwiftHelpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSwiftHelpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSwiftHelpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoho0722","download_url":"https://codeload.github.com/leoho0722/SwiftHelpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSwiftHelpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34557551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","macos","swift","swift-package-manager"],"created_at":"2025-02-26T10:31:14.573Z","updated_at":"2026-06-20T04:31:12.877Z","avatar_url":"https://github.com/leoho0722.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftHelpers\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoho0722%2FSwiftHelpers%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/leoho0722/SwiftHelpers)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoho0722%2FSwiftHelpers%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/leoho0722/SwiftHelpers)\n![GitHub tag (with filter)](https://img.shields.io/github/v/tag/leoho0722/SwiftHelpers?label=Release)\n\nUse Swift to create some amazing things!\n\n## Minimum Requirement\n\n* iOS 15.0 or above\n* macOS 12.0 or above\n* Xcode 14.0 or above\n\n## Package Development Environment\n\n* macOS Sonoma 14.4.1 (23E224)\n* Xcode 15.3 (15E204a)\n* Swift 5.9.2 (5.9.2.2.56)\n\n## Install\n\nCurrently only installation using Swift Package Manager is supported.\n\n```git\nhttps://github.com/leoho0722/SwiftHelpers.git\n```\n\n![Install](./Assets/Install.png)\n\n## How to use\n\n### Example: Convert to JSON Data\n\n```swift\nimport Foundation\nimport SwiftHelpers\n\nfunc createURLRequest\u003cE\u003e(with url: URL,\n                         method: HTTP.Method,\n                         parameters: E) -\u003e URLRequest where E: Encodable {\n    var request = URLRequest(url: url)\n    request.httpMethod = method.rawValue\n    request.allHTTPHeaderFields = [\n        HTTP.HeaderFields.contentType.rawValue : HTTP.ContentType.json.rawValue\n    ]\n    \n    if method != .get {\n        request.httpBody = try? JSON.toJsonData(data: parameters)\n    }\n    \n    return request\n}\n```\n\n### Example: Safely use SF Symbols with UIKit and AppKit and SwiftUI\n\n#### UIKit\n\n```swift\nimport SwiftHelpers\nimport UIKit\n\nclass ViewController: UIViewController {\n    \n    private let imageView = UIImageView()\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        imageView.image = UIImage(symbols: .applelogo) // Use SwiftHelpers\n        // imageView.image = UIImage(systemName: \"applelogo\") // Use UIKit\n        view.addSubView(imageView)\n        \n        // ...\n    }\n}\n```\n\n#### AppKit\n\n```swift\nimport Cocoa\nimport SwiftHelpers\n\nclass ViewController: NSViewController {\n    \n    private let imageView = NSImageView()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        imageView.image = NSImage(symbols: .applelogo) // Use SwiftHelpers\n        // imageView.image = NSImage(systemSymbolName: \"applelogo\", accessibilityDescription: nil) // Use AppKit\n        view.addSubView(imageView)\n        \n        // ...\n    }\n\n    override var representedObject: Any? {\n        didSet {\n            // Update the view, if already loaded.\n        }\n    }\n}\n```\n\n#### SwiftUI\n\n```swift\nimport SwiftHelpers\nimport SwiftUI\n\nstruct ContentView: View {\n    \n    var body: some View {\n        Image(symbols: .applelogo) // Use SwiftHelpers\n        // Image(systemName: \"applelogo\") // Use SwiftUI\n        \n        Label(\"Safely use SF Symobols with SwiftUI\", symbols: .applelogo) // Use SwiftHelpers\n        // Label(\"Use SF Symobols with SwiftUI\", systemImage: \"applelogo\") // Use SwiftUI\n        \n        // ...\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoho0722%2Fswifthelpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoho0722%2Fswifthelpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoho0722%2Fswifthelpers/lists"}