Skip to content

Swift package that provides a rudimentary `UserDefaults` browser and editor for debug mode in SwiftUI apps.

License

Notifications You must be signed in to change notification settings

apparata/UserDefaultsUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserDefaultsUI

Swift package that provides a UserDefaults browser and editor for debug mode in SwiftUI apps.

License

See the LICENSE file for licensing information.

Usage

Let's say the keys of your user defaults have a prefix, e.g. "io.apparata.", and you don't need to see it prominently in the UserDefaults browser, then you would list that prefix in the hidePrefixes parameter to the UserDefaultsBrowser initializer.

In the example below, NavigationView is used, but NavigationStack works too.

import SwiftUI
import UserDefaultsUI

struct ContentView: View {
    var body: some View {
        NavigationView {
            UserDefaultsBrowser(hidePrefixes: ["io.apparata."])
        }
    }
}

Screenshot

Screenshot

About

Swift package that provides a rudimentary `UserDefaults` browser and editor for debug mode in SwiftUI apps.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages