Swiftpack.co - Nef10/FileSelectorView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
A small Swift UI Package with one View to select a file
.package(url: "https://github.com/Nef10/FileSelectorView.git", from: "v1.0.0")


CI Status Documentation percentage License: MIT Latest version platforms supported: macOS SPM compatible

A small Swift UI Package with one View to select a file.


Simple example:

@State private var fileURL: URL?
var body: some View {
    FileSelectorView(allowedFileTypes: ["txt", "md"], url: self.$fileURL)

With a label in the body:

var body: some View {
     HStack(alignment: .firstTextBaseline) {
        FileSelectorView(allowedFileTypes: ["txt", "md"], url: self.$fileURL)

Do disable a button (for example the continue button in a form) until a file is selected:

    Button("Continue") { ... }
    .disabled(fileURL == nil)

You can check out the complete documentation here.


No file selected File selected File selected with label
Screen Shot 2020-07-13 at 18 58 30 Screen Shot 2020-07-13 at 18 59 38 Screen Shot 2020-07-13 at 18 59 45


The library supports the Swift Package Manger, so simply add it to the Swift Packages tab of your Xcode project.


Stars: 0
Last commit: Yesterday

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

1.0.0 First release
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics