/DocumentKit

DocumentKit is a Swift SDK that adds more capabilities to DocumentGroup-based apps in SwiftUI.

Primary LanguageSwiftMIT LicenseMIT

DocumentKit Logo

Version Swift 5.9 Swift UI MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About DocumentKit

DocumentKit is a Swift SDK that adds more capabilities to DocumentGroup-based apps in SwiftUI.

DocumentGroup-based apps are in general quite limited when it comes to customization. For instance, you can't add custom items to the document browser toolbar. Also, since a DocumentGroup has no view until you open a document, you can't present any initial onboarding screens or modals from it.

DocumentKit lets you do all these things, to let you create a better user experience for your document-based apps.

Installation

DocumentKit can be installed with the Swift Package Manager:

https://github.com/danielsaidi/DocumentKit.git

Getting started

DocumentKit extends DocumentGroup with modifiers that let you add custom toolbar items, customize the document browser etc.:

@main
struct MyApp: App {

    var body: some Scene {
        DocumentGroup(newDocument: DemoDocument()) { file in
            ContentView(document: file.$document)
        }
        .additionalNavigationBarButtonItems(
            leading: [...],
            trailing: [...]
        )
        .showFileExtensions(true)
        .onboardingSheet {
            MyModalView()
        }
    }
}

DocumentKit also extends DocumentGroup with a modifier that lets you present onboarding screens and splash screens when the app starts for the first time, let you inspect the underlying document group, etc.

For more information, please see the getting started guide.

Documentation

The online documentation has more information, articles, code examples, etc.

Demo Application

The demo app lets you explore the library with iOS. To try it out, just open and run the Demo project.

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.

Your support makes it possible for me to put more work into these projects and make them the best they can be.

Contact

Feel free to reach out if you have questions or if you want to contribute in any way:

License

DocumentKit is available under the MIT license. See the LICENSE file for more info.