user486134
user486134

Reputation: 415

How to save application preferences in Mac OS?

Is there a native way to save preferences in Mac OS ?

Can I write preferences into application package content directory ?

Upvotes: 2

Views: 1860

Answers (2)

Michael J. Barber
Michael J. Barber

Reputation: 25042

The native way is to use NUSuserDefaults. You won't want to write into the application directory for a number of reasons, not least because different users can have different preferences.

Upvotes: 1

Chris Gregg
Chris Gregg

Reputation: 2382

The NSUserDefaults class is the standard way to save application preferences.

There are a number of tutorials / examples online (Google is your friend):

NSUserDefaults Tutorial

Upvotes: 4

Related Questions