Define ENUM values in a .plist in Xcode
Asked Answered
S

1

6

I use a configuration.plist file to configure certain parameters in my application and initialise few classes based on the contents of this plist file.

However I want to expose to the developer a list of options that can be selected as below(per say),

enter image description here

I can this kind of option available in application info.plist file but I don't get to see anywhere else on how I can achieve this. I'm looking at getting a drop down list showing the list of available options, Possibly an ENUM list.

Appreciate any assistance.

Superhighway answered 2/10, 2013 at 3:4 Comment(1)
I don't believe you can do that. The (default) keys and values you are talking about are hard-coded in Xcode to have a nice, localized, human-readable description.Lunde
B
-1

You can read from the .plist file:

NSDictionary* infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString* region = [infoDictionary objectForKey:(__bridge id) kCFBundleDevelopmentRegionKey];
Brendon answered 2/10, 2013 at 6:25 Comment(1)
You've misunderstood the question. The question is about how to enable helpful editing of a property list other than the info.plist within Xcode, with drop down options and so forth.Barbaric

© 2022 - 2024 — McMap. All rights reserved.