| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Wednesday, July 24, 2002, at 01:01 PM, email@hidden wrote:
It's definitely not a plist format.
CFBundleName = "something";
is not a usual NSDictionary entry.
How can we get the string associated to the key CFBundleName without having to rewrite a complete parser?
It uses the strings-file format, which is a stripped-down version of the old plist format. Fortunately, the XML plist parser will also recognize strings-file format and the old plist format, so you don't need to do anything special. Conversely, .strings files such as InfoPlist.strings can use the XML plist format, although the strings-file format is usually more convenient.
Even more conveniently, you don't have to read InfoPlist.strings at all, because CFBundle and/or NSBundle will do it for you. If you're using CFBundle, the recommended approach is to use CFBundleGetValueForInfoDictionaryKey(). This will get a localized value from InfoPlist.strings, if there is one, or a non-localized value if not. If for some reason you must distinguish between localized and non-localized values, you can use CFBundleGetInfoDictionary() and CFBundleGetLocalInfoDictionary(). The corresponding NSBundle methods are objectForInfoDictionaryKey:, infoDictionary, and localizedInfoDictionary.
| References: | |
| >Re: What's the format of InfoPlist.strings? (From: Douglas Davidson <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.