xcode 验证错误:info.plist 文件缺少所需的密钥:CFBundleVersion
Posted
技术标签:
【中文标题】xcode 验证错误:info.plist 文件缺少所需的密钥:CFBundleVersion【英文标题】:xcode VALIDATION error: The info.plist file is missing the required key: CFBundleVersion 【发布时间】:2013-01-25 21:41:32 【问题描述】:我尝试在摘要和 plist 文件中输入版本号,但我仍然遇到同样的错误。
CFBundleVersion 存在于 plist 文件中:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>$PRODUCT_NAME</string>
<key>CFBundleExecutable</key>
<string>$EXECUTABLE_NAME</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Calmness_icon_ratina.png</string>
<string>Default.png</string>
<string>Default@2x.png</string>
<string>Calmness_icon57.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.jassem.calmness</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6</string>
<key>CFBundleName</key>
<string>$PRODUCT_NAME</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>BNDL</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>
【问题讨论】:
【参考方案1】:很可能是 xcode 本身的问题。尝试清理,删除管理器中的派生数据,重新启动 Xcode。如果这不起作用,请检查项目窗格,总而言之,如果版本和构建都说 1.0。
【讨论】:
我忘了说我最近将xcode升级到4.5,所以我的应用程序有一半是用旧版本的xcode开发的。您认为降级到旧版本的 xcode 并尝试使用它进行验证可以解决问题吗? @Chris Loonam【参考方案2】:由于某种原因,Xcode 没有找到提到的键。
查看目标的构建设置,您为 info.plist 设置了哪个路径 删除您的派生文件夹,您可能在此处有旧版本的文件 如果您在 Finder 中双击他的 plist,它是否正确打开?您可能不小心损坏了它 创建一个新项目并将您的 info.plist 替换为新项目【讨论】:
【参考方案3】:您需要进入 info.plist,添加一个名为“Application Category”的新键并选择您设计的类别。
【讨论】:
以上是关于xcode 验证错误:info.plist 文件缺少所需的密钥:CFBundleVersion的主要内容,如果未能解决你的问题,请参考以下文章
Xcode Buildtime 错误:'无法加载文件列表的内容:'.../Info.plist'(在目标'xxxx'中)
“帮助修复”错误:无法从文件中读取属性列表:info.plist