1

In here (NSToolbar autosavesConfiguration) it is mentioned that the toolbar configuration is saved into the user defaults.

Where are they located and how do I edit them?

I'm on OSX 10.13 using Xcode 9.

My application is not meant for iPhone/iPad, it's a regular Desktop one.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
Igor
  • 5,620
  • 11
  • 51
  • 103
  • 1
    [`NSUserDefaults`](https://developer.apple.com/documentation/foundation/nsuserdefaults?language=objc) – HangarRash Jun 21 '23 at 01:51
  • @HangarRash, thx for the reply. Maybe I didn't express myself properly - what I am looking for is the place on the disk where the default toolbar configuration is stored so I can remove it and test my code changes. – Igor Jun 21 '23 at 03:34
  • They are stored in some opaque system database not intended to be directly manipulated. You can use the `defaults` command line tool to modify or completely remove your app's settings. See `defaults -h`. – Gerd K Jun 21 '23 at 05:09
  • Does this answer your question? [Where is a Mac Application's NSUserDefaults Data Stored?](https://stackoverflow.com/questions/7982740/where-is-a-mac-applications-nsuserdefaults-data-stored) – Willeke Jun 21 '23 at 06:57
  • @GerdK, then how do you test the application if you can't directly manipulate the defaults? There has to be a way to edit and remove them in order to see what is happening... – Igor Jun 21 '23 at 14:47
  • @Willeke, I will check that tonight. Thx. – Igor Jun 21 '23 at 14:48
  • Note that the answer @Willeke links to is no longer valid. And you can manipulate the defaults directly with the `defaults` command line tool. As I have mentioned, `defaults -h` will tell you what you need to know. – Gerd K Jun 23 '23 at 07:53
  • @GerdK, thx. Why does his/her answer invalid? I didn't check it yet and so just curious... – Igor Jun 23 '23 at 09:21
  • The linked answer was valid at the time it was written. Apple has since changed the way user defaults are managed, going from a per-app file-based representation (as that answer showed) to a system-wide database. That happened a few years ago. – Gerd K Jun 23 '23 at 15:00
  • @GerdK, understood. I am working with OSX 10.13, so it may still be applicable. I'll check both. Thx. – Igor Jun 23 '23 at 17:11
  • The `defaults` command line tool will work for either case. – Gerd K Jun 23 '23 at 22:51

0 Answers0