CFBundleGetValueForInfoDictionaryKey(_:_:)
Returns a value (localized if possible) from a bundle’s information dictionary.
Declaration
func CFBundleGetValueForInfoDictionaryKey(_ bundle: CFBundle!, _ key: CFString!) -> CFTypeRef!Parameters
- bundle:
The bundle to examine.
- key:
The key for the value to return.
Return Value
A value corresponding to key in bundle’s information dictionary. If available, a localized value is returned, otherwise the global value is returned. Ownership follows the The Get Rule.
Discussion
You should use this function rather than retrieving values directly from the info dictionary (Info.plist) because CFBundleGetValueForInfoDictionaryKey returns localized values if any are available (from the InfoPlist.strings file for the current locale).
See Also
Getting Bundle Properties
CFBundleCopyBundleURL(_:)CFBundleGetDevelopmentRegion(_:)CFBundleGetIdentifier(_:)CFBundleGetInfoDictionary(_:)CFBundleGetLocalInfoDictionary(_:)CFBundleCopyInfoDictionaryInDirectory(_:)CFBundleCopyInfoDictionaryForURL(_:)CFBundleGetPackageInfo(_:_:_:)CFBundleGetPackageInfoInDirectory(_:_:_:)CFBundleCopyExecutableArchitectures(_:)CFBundleCopyExecutableArchitecturesForURL(_:)CFBundleGetVersionNumber(_:)