Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the infoDictionary key to get the copyright defined in the bundle?

I want to use the copyright placed in the bundle of the project "info plist." I cannot find the key documented. Does anyone know the value of the key?

[[[NSBundle mainBundle] infoDictionary] objectForKey: @"key-for-copyright"]
like image 641
mobibob Avatar asked Nov 22 '11 21:11

mobibob


1 Answers

It should be NSHumanReadableCopyright. You can localize it too if needed, but it must be defined in the plist first.

Adding a useful suggestion if there is interest in any of the other keys:

NSLog(@"%s \n%@", __FUNCTION__, [[[NSBundle mainBundle] infoDictionary] allKeys]);

which yields a result like this:

2011-11-22 17:08:02.072 MyApp [1007:707] -[SplashScreenViewController viewWillAppear:] 
(
    CFBundleSignature,
    DTSDKName,
    DTPlatformBuild,
    BuildMachineOSBuild,
    NSBundleInitialPath,
    NSHumanReadableCopyright,
    CFBundleExecutable,
    CFBundleIconFiles,
    LSRequiresIPhoneOS,
    CFBundleInfoPlistURL,
    NSMainNibFile,
    CFBundleShortVersionString,
    CFBundlePackageType,
    NSBundleResolvedPath,
    DTSDKBuild,
    CFBundleResourceSpecification,
    DTXcodeBuild,
    DTCompiler,
    CFBundleDisplayName,
    CFBundleDevelopmentRegion,
    UTExportedTypeDeclarations,
    DTPlatformName,
    CFBundleURLTypes,
    CFBundleName,
    CFBundleVersion,
    UTImportedTypeDeclarations,
    CFBundleDocumentTypes,
    DTPlatformVersion,
    CFBundleSupportedPlatforms,
    DTXcode,
    MinimumOSVersion,
    UISupportedInterfaceOrientations,
    CFBundleIdentifier,
    UIAppFonts,
    UIDeviceFamily,
    CFBundleExecutablePath,
    CFBundleInfoDictionaryVersion
)
like image 171
CodaFi Avatar answered Nov 10 '22 20:11

CodaFi