iosobjective-ckey-valueinfo.plistnsbundle

Info.plist key strings - defined in the SDK, or do I have to create them?


For example, does Apple provide NSString * const kCFBundleDisplayName somewhere? Or do I have to do it myself?

NSString * const kCFBundleDisplayName = @"CFBundleDisplayName";

@implementation NSBundle (Sugar)

+(NSString *)displayName {
   return [[[NSBundle mainBundle] infoDictionary] objectForKey:kCFBundleDisplayName];
}

@end

Solution

  • kCFBundleNameKey is defined in the iOS SDK, and gets you the short name. The display name does not have an iOS SDK defined constant (you have to do it yourself).

    http://developer.apple.com/library/mac/#qa/qa1544/_index.html