【发布时间】:2011-11-22 21:50:24
【问题描述】:
我想使用“info plist”项目包中的版权。我找不到记录的密钥。有人知道密钥的价值吗?
[[[NSBundle mainBundle] infoDictionary] objectForKey: @"key-for-copyright"]
【问题讨论】:
标签: iphone ipad nsbundle copyright-display
我想使用“info plist”项目包中的版权。我找不到记录的密钥。有人知道密钥的价值吗?
[[[NSBundle mainBundle] infoDictionary] objectForKey: @"key-for-copyright"]
【问题讨论】:
标签: iphone ipad nsbundle copyright-display
它应该是 NSHumanReadableCopyright。如果需要,您也可以对其进行本地化,但必须先在 plist 中定义。
如果对其他任何键感兴趣,请添加有用的建议:
NSLog(@"%s \n%@", __FUNCTION__, [[[NSBundle mainBundle] infoDictionary] allKeys]);
产生这样的结果:
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
)
【讨论】: