[iPhone] Receiving DefaultValue from .plist
Hello everyone,
my application has a Root.plist file like this:
(The real file is a little bit more complicated) In the program, I use something like
This works (returns "foo"/"bar") after one of the options has been selected in the Settings App.
If I understand the +Settings Application Schema Reference+ correctly, this should return "abc" by default, i.e. if the none of the options has been selected.
However, all I get is null. Any idea what's wrong here?
my application has a Root.plist file like this:
...
<dict>
<key>Title</key>
<string>myTitle</string>
<key>Key</key>
<string>myMultiValueTest</string>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>DefaultValue</key>
<dict>
<key>boolValue</key>
<true/>
<key>stringValue</key>
<string>abc</string>
</dict>
<key>Values</key>
<array>
<dict>
<key>boolValue</key>
<true/>
<key>stringValue</key>
<string>foo</string>
</dict>
<dict>
<key>boolValue</key>
<false/>
<key>stringValue</key>
<string>bar</string>
</dict>
</array>
<key>Titles</key>
<array>
<string>title1</string>
<string>title2</string>
</array>
</dict>
...
(The real file is a little bit more complicated) In the program, I use something like
[[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"myMultiValueTest" valueForKey:@"stringValue"];
This works (returns "foo"/"bar") after one of the options has been selected in the Settings App.
If I understand the +Settings Application Schema Reference+ correctly, this should return "abc" by default, i.e. if the none of the options has been selected.
However, all I get is null. Any idea what's wrong here?
Mac Mini, Mac OS X (10.5.4)