xcode VALIDATION error: The info.plist file is missing the required key: CFBundleVersion

倾然丶 夕夏残阳落幕 提交于 2020-01-14 13:48:48

问题


hi guys Ive been searching all the internet looking for a solution to this problem, only found 1 and it didn't solve it :/

I've tried typing the version number in the summary and in the plist file still having the same error

the CFBundleVersion exists though in the plist file

    <?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:


most likely a problem with xcode itself. try cleaning, deleting derived data in organizer, restarting Xcode. if that doesnt work check in the project pane, in summary, if the version and build both say 1.0.




回答2:


For some reason Xcode does not find the mentioned key.

  • look in your target's build setting which path for info.plist you have set
  • remove your derived files folder, you might have an old version of the file in here
  • if you double-click on he plist in Finder, does it properly open? You might have accidentially corrupted it
  • make a new project and replace your info.plist with the new one



回答3:


You need to go to info.plist, add a new key named: “Application Category” and select your designed category.



来源:https://stackoverflow.com/questions/14530830/xcode-validation-error-the-info-plist-file-is-missing-the-required-key-cfbundl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!