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

Vline-App/UserDefaultsUI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 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

  • Swift 100.0%