Function

CFBundleGetValueForInfoDictionaryKey

Returns a value (localized if possible) from a bundle’s information dictionary.

Declaration

CFTypeRef CFBundleGetValueForInfoDictionaryKey(CFBundleRef bundle, CFStringRef key);

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

Returns the location of a bundle.

CFBundleGetDevelopmentRegion

Returns the bundle’s development region from the bundle’s information property list.

CFBundleGetIdentifier

Returns the bundle identifier from a bundle’s information property list.

CFBundleGetInfoDictionary

Returns a bundle’s information dictionary.

CFBundleGetLocalInfoDictionary

Returns a bundle’s localized information dictionary.

CFBundleCopyInfoDictionaryInDirectory

Returns a bundle’s information dictionary.

CFBundleCopyInfoDictionaryForURL

Returns the information dictionary for a given URL location.

CFBundleGetPackageInfo

Returns a bundle’s package type and creator.

CFBundleGetPackageInfoInDirectory

Returns a bundle’s package type and creator without having to create a CFBundle object.

CFBundleCopyExecutableArchitectures

Returns an array of CFNumbers representing the architectures a given bundle provides.

CFBundleCopyExecutableArchitecturesForURL

Returns an array of CFNumbers representing the architectures a given URL provides.

CFBundleGetVersionNumber

Returns a bundle’s version number.