arachide
arachide

Reputation: 8066

Is macOS app setting.bundle file similar as iPhone app setting.bundle file?

I am developing a Mac app. I hope store some data to system setting where I use the code to access

NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];
[defaults setObject:  [settingMutableDictionary objectForKey:myObject ] forKey:@"myKey"];

I try to copy the iPhone app Setting.bundle file to my macOS project, but When I opened the file Root.plist, it displayed

'iPhone Settings Scheme"

This is not what I want.

your comment welcome

**enter image description here**

Upvotes: 2

Views: 335

Answers (1)

l'L'l
l'L'l

Reputation: 47229

macOS does not use a settings.bundle like iOS, it uses a standard .plist generally stored in $HOME/Library/Preferences/. The .plist takes on the name of the bundle identifier:

<ApplicationBundleIdentifer>.plist

Preferences and Settings Programming Guide

Upvotes: 2

Related Questions