Skip to content

dhg-applab/ExportKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ExportKit

A simple package to save and export data in the app. The package also includes simple views to list all saved data and export them using the ShareSheet.

Setup

To export data, ExportKit needs an exportStrategy which need to be defined before exporting the data. For UIKit apps you can set the strategy in the App Delegate, SwiftUI apps can make use root view (where :App is defiend).

ExportKit.shared.exportStrategy = { item in
    guard let item = item else { 
        return .failure(ExportKitError.itemNotFound) 
    }
    
    *** DO SOMETHING WITH THE ITEM *** 
    
    return .success(DATA_TO_BE_SHARED)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages