我已经尝试在摘要和 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>
最佳答案
很可能是 xcode 本身的问题。尝试清理,删除管理器中的派生数据,重新启动 Xcode。如果这不起作用,请检查项目 Pane ,总而言之,如果版本和构建都显示 1.0。
关于ios - xcode 验证错误 : The info. plist 文件缺少所需的 key :CFBundleVersion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14530830/