I know that Cocoa could save a window's position in user defaults using setFrameAutosaveName: or saveFrameUsingName: method.
But where is user defaults?
Is it in the fixed place for every application?
It is stored in your applications user defaults. For each window it creates a default with a fixed prefix of NSWindow Frame and appends your window's autosave name. Example:
defaults read my.app.identifier
...
"NSWindow Frame MyWindowAutoSaveName" = "386 174 1811 1080 0 0 2560 1418 ";
...
For sandboxed apps:
~/Library/Containers/my.app.identifier/Data/Library/Preferences/my.app.identifier.plist
For non-sandboxed apps:
~/Library/Preferences/my.app.identifier.plist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With