xcode VALIDATION错误:info.plist文件缺less必需的键:CFBundleVersion

嗨,大家好我一直在寻找所有的互联网寻找解决这个问题,只发现1,它并没有解决它:/

我试过在摘要和plist文件中input版本号仍然有相同的错误

虽然在plist文件中存在CFBundleVersion

<?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。 如果这不起作用检查项目窗格,总之,如果版本和构build都说1.0。

出于某种原因Xcode没有find提到的关键。

  • 查看你的目标的构build设置你已经设置了info.plist的path
  • 删除你的派生文件文件夹,你可能在这里有一个旧版本的文件
  • 如果双击Finder中的plist,是否正确打开? 你可能已经意外地损坏了它
  • 做一个新的项目,并用新的replace你的info.plist

你需要去info.plist,添加一个名为“Application Category”的新键并select你的devise类别。