{"id":17424147,"url":"https://github.com/ctreffs/swiftnfd","last_synced_at":"2025-08-25T07:09:44.740Z","repository":{"id":46225126,"uuid":"424900588","full_name":"ctreffs/SwiftNFD","owner":"ctreffs","description":"Swift wrapper for Native File Dialog, a tiny, neat C library that portably invokes native file open and save dialogs.","archived":false,"fork":false,"pushed_at":"2025-04-15T17:14:00.000Z","size":135,"stargazers_count":3,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T18:26:35.821Z","etag":null,"topics":["dialog","linux","macos","spm","swift","swift-package-manager","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctreffs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ctreffs"],"custom":["https://www.paypal.com/donate?hosted_button_id=GCG3K54SKRALQ"]}},"created_at":"2021-11-05T09:56:58.000Z","updated_at":"2024-09-19T12:20:04.000Z","dependencies_parsed_at":"2024-02-06T01:42:02.126Z","dependency_job_id":"2114fd65-e009-4fcd-a1dc-6e83a6f06df6","html_url":"https://github.com/ctreffs/SwiftNFD","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":"0.34285714285714286","last_synced_commit":"95515615134981e958d6e1c5e515e54144f78e5d"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2FSwiftNFD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2FSwiftNFD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2FSwiftNFD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2FSwiftNFD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctreffs","download_url":"https://codeload.github.com/ctreffs/SwiftNFD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249174240,"owners_count":21224680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dialog","linux","macos","spm","swift","swift-package-manager","windows"],"created_at":"2024-10-17T05:06:19.856Z","updated_at":"2025-04-16T00:20:55.309Z","avatar_url":"https://github.com/ctreffs.png","language":"C","funding_links":["https://github.com/sponsors/ctreffs","https://www.paypal.com/donate?hosted_button_id=GCG3K54SKRALQ"],"categories":[],"sub_categories":[],"readme":"# Swift Native File Dialog\n\n[![license](https://img.shields.io/badge/license-zlib-brightgreen.svg)](LICENSE)\n[![macOS](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-macos.yml)\n[![Linux](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-linux.yml)\n[![Windows](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-windows.yml/badge.svg)](https://github.com/ctreffs/SwiftNFD/actions/workflows/ci-windows.yml)\n\nA thin Swift wrapper around the popular [mlabbe/nativefiledialog](https://github.com/mlabbe/nativefiledialog) library by Michael Labbe.\n\nNative File Dialog is a tiny, neat C library that portably invokes native file open, folder select and save dialogs. Write dialog code once and have it pop up native dialogs on all supported platforms.  Avoid linking large dependencies like wxWidgets and qt.\n\n### Features:\n\n - Zlib licensed.\n - Consistent UTF-8 support on all platforms.\n - Simple universal file filter syntax.\n - Multiple file selection support.\n - No third party dependencies for building or linking.\n - Support for Vista's modern `IFileDialog` on Windows.\n - Support for non-deprecated Cocoa APIs on OS X.\n - GTK3 dialog on Linux.\n - Tested, works alongside [SDL2](https://www.libsdl.org) on all platforms, for the game developers out there.\n\n## Usage ##\n\n### Single file dialog\n\n```swift\n// open single file dialog without filters\nlet result = NFD.OpenDialog()\n    \nswitch result {\ncase let .success(path):\n    if let path = path {\n        // use path\n    } else {\n        // user canceled\n    }\ncase let .failure(error):\n    // an error has occured\n}\n```\n\n### macOS Demo\n\nYou can find a macOS demo application in `/Apps/NFD-Demo/NFD-Demo.xcodeproj`\n\n![NFD-Demo](Resources/NFD-Demo.png)\n\n\n## File Filter Syntax\n\nThere is a form of file filtering in every file dialog API, but no consistent means of supporting it.  NFD provides support for filtering files by groups of extensions, providing its own descriptions (where applicable) for the extensions.\n\nA wildcard filter is always added to every dialog.\n\n#### Examples ####\n\n`txt` The default filter is for text files.  There is a wildcard option in a dropdown.\n\n`png,jpg;psd` The default filter is for png and jpg files.  A second filter is available for psd files.  There is a wildcard option in a dropdown.\n\n`nil` Wildcard only.\n\n\n# Copyright and Credit\n\nCopyright \u0026copy; 2014-2019 [Frogtoss Games](https://www.frogtoss.com), Inc.\nFile [LICENSE](LICENSE) covers all files in this repo.\n\nNative File Dialog by Michael Labbe\n\u003cmike@frogtoss.com\u003e\n\nTomasz Konojacki for [microutf8](https://puszcza.gnu.org.ua/software/microutf8/)\n\n[Denis Kolodin](https://github.com/DenisKolodin) for mingw support.\n\n[Tom Mason](https://github.com/wheybags) for Zenity support.\n\n## Support ##\n\nDirected support for this work is available from the original author under a paid agreement.\n\n[Contact Frogtoss Games](https://www.frogtoss.com/pages/contact.html).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctreffs%2Fswiftnfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctreffs%2Fswiftnfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctreffs%2Fswiftnfd/lists"}