Xcode 4.0验证错误CFBundleVersion

Dur*_*han 8 iphone xcode ipad

我正在尝试更新我在Xcode 3.x版本中创建的iPhone/iPad应用程序.

我已经在我的Info.plist中添加了CFBundleVersion和另一个,我已经越过检查了所有的东西,但我仍然得到以下错误.

这个Bundle是无效的.Info.plist文件缺少必需的密钥:CFBundleVersion(1091)

我一次又一次地得到它,我检查了已经在我的Info.plist文件中的CFBundleVersion.

请帮帮我

谢谢

以下是Info.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>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
<array>
    <string>icon-57.png</string>
    <string>icon-72.png</string>
    <string>icon-144.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.my-irc</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.5</string>
<key>CFBundleSignature</key>
<string>coRC</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>Internet Relay Chat Server</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>irc</string>
            <string>ircs</string>
        </array>
    </dict>
</array>
<key>CFBundleVersion</key>
<string>1.1</string>
<key>CQBuildType</key>
<string>personal</string>
<key>LSMinimumSystemVersion</key>
<string>3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MVChatCoreCTCPVersionReplyInfo</key>
<string>http://colloquy.mobi</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)

Ed *_*dez 16

我有同样的问题.我这样解决了.在XCode 4.2中,单击Target.在摘要部分中,您将看到版本和内部版本号.如果你将它们设置为相同的东西,它就可以了.如果您只设置版本并忽略构建字段,您将收到错误.这解决了我的问题.


Wex*_*Wex 1

听起来从 3.x 到 4.0 的过渡过程中出了点问题,需要检查一些事项:

  • 在项目目标构建设置中,确保“Info.plist 文件”指向正确的文件。
  • 检查项目目标摘要中的版本字段是否为正确的值
  • 这些天实际上应该有两个条目(默认情况下):CFBundleVersion 和 CFBundleShortVersionString 尽管我怀疑这就是问题所在
  • 确保“CFBundleVersion”之前或之后没有空格

否则,您应该可以将您的 plist 粘贴到此处。在 Xcode 中,右键单击 plist 文件并选择“打开方式”>“源代码”。这将为您提供 raw-xml,您可以将其粘贴到您的问题中(编辑您的问题以更新它)。