Gavin Wiggins

About  /  Notes  /  Photos

Defaults command line tool

Written on November 10, 2022

User defaults created via UserDefaults or AppStorage can be read and deleted using the defaults command line tool. This is useful to clear an app's preferences when developing in Xcode by providing the bundle identifier to the tool.

# Read the defaults for the app
defaults read com.GavinWiggins.SidebarNav

# Delete the defaults for the app
defaults delete com.GavinWiggins.SidebarNav

Gavin Wiggins © 2024.
Made on a Mac with Genja. Hosted on GitHub Pages.