Deleting application data / NSUserDefaults on macOS

I am from the background of iOS dev and am recording my first MacOS application in Swift.

In iOS, if I want to remove the NSUserdefaults application, I would press / hold the application icon on my device and delete it.

On MacOS, however, I do not see the application icon in the application folder. What am I missing?

Note. My application appears only in the status bar (I have an application - agent (..) = YES in my info.plist)

+4
source share
3 answers

reset, defaults. MacOS , Apple . :

defaults delete your.app.bundle.id

.

, , . , .

, ~/Library/Containers/your.app.bundle.id.

, , , ~/Library/Application Support ..

name.app.

+13

, Finder. Finder ( SpotLight Search ), .

0

Delete /Users/<yourUsername>/Library/Preferences/<yourAppBundleID>.plist.

You do not need to remove the application only in the settings file.

In iOS, everything for the application is stored in one container, while on MacOS things are organized differently, since the user has access to the underlying file system.

-1
source

Source: https://habr.com/ru/post/1668666/


All Articles