Where is the data for NSUserDefaults standardUserDefaults stored? I would like to edit stored values as is possible in the Windows Registry. I am using XCode 12.3 on Catalina. Finder search does not show any non-source code file on the machine which contains the persisted values.
Where is the data for standardUserDefaults stored?
Haven't been able to find the .plist file containing the data, but the all the defaults can be viewed by typing
at the debug console while the app is stopped at a breakpoint. BundleIdentifier is shown in the General tab of the Project.xcodeproj file.
Code Block po [[ NSUserDefaults standardUserDefaults ]persistentDomainForName:BundleIdentifier]
at the debug console while the app is stopped at a breakpoint. BundleIdentifier is shown in the General tab of the Project.xcodeproj file.
The .plist file is contained in a hidden folder as Users/<username>/library/preferences/<bundle identifier>.plist. Hidden folders and files can be displayed in Finder by typing cmd [apple symbol]-shift- period[.]. The same command repeated hides them, providing Finder is not displaying items in a hidden folder.
Finder search does not appear to display items in hidden folders even if hidden items are shown in the display.
Finder search does not appear to display items in hidden folders even if hidden items are shown in the display.