swift - 包中的 info.plist 必须包含 CFBundleVersion key

标签 swift validation swift2 plist info.plist

我试图在使用新版本上传到苹果之前验证应用程序,但我收到了这个错误:

“包中的 info.plist 必须包含 CFBundleVersion key 。”

但是什么包?会不会跟框架有关?

两个 key 都在文件中所以我不知道发生了什么

<?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>CFBundleIdentifier</key>
        <string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>2.0</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
        <string>2.0</string>
        <key>Fabric</key>
        <dict>
            <key>APIKey</key>
            <string></string>
            <key>Kits</key>
            <array>
                <dict>
                    <key>KitInfo</key>
                    <dict/>
                    <key>KitName</key>
                    <string>Crashlytics</string>
                </dict>
            </array>
        </dict>
        <key>ITSAppUsesNonExemptEncryption</key>
        <false/>
        <key>LSApplicationQueriesSchemes</key>
        <array>
            <string>comgooglemaps</string>
        </array>
        <key>LSRequiresIPhoneOS</key>
        <true/>
        <key>UIAppFonts</key>
        <array>
            <string>ProximaNova-Light.otf</string>
            <string>ProximaNova-Semibold.otf</string>
            <string>ProximaNova-Regular.otf</string>
            <string>ProximaNova-LightItalic.otf</string>
        </array>
        <key>UIBackgroundModes</key>
        <array>
            <string>remote-notification</string>
        </array>
        <key>UIFileSharingEnabled</key>
        <true/>
        <key>UILaunchStoryboardName</key>
        <string>LaunchScreen</string>
        <key>UIMainStoryboardFile</key>
        <string>Main</string>
        <key>UIRequiredDeviceCapabilities</key>
        <array>
            <string>armv7</string>
        </array>
        <key>UIStatusBarStyle</key>
        <string>UIStatusBarStyleLightContent</string>
        <key>UISupportedInterfaceOrientations</key>
        <array>
            <string>UIInterfaceOrientationPortrait</string>
        </array>
        <key>UISupportedInterfaceOrientations~ipad</key>
        <array>
            <string>UIInterfaceOrientationPortrait</string>
            <string>UIInterfaceOrientationPortraitUpsideDown</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
            <string>UIInterfaceOrientationLandscapeLeft</string>
        </array>
        <key>UIViewControllerBasedStatusBarAppearance</key>
        <true/>
    </dict>
    </plist>

最佳答案

有时 iTunes 连接会与您将版本与上传的版本捆绑在一起(即使它未发布)发生冲突,因此只需将当前版本从 2.0 升级到 2.1 或 3.0 就可以解决您的问题,请阅读此 post了解更多关于任何其他可能的问题。

关于swift - 包中的 info.plist 必须包含 CFBundleVersion key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43736923/

相关文章:

ios - UITabBar 禁用/启用 UIButton 单击上的项目

java - 如何根据 selectOneMenu 的当前选择验证 selectManyCheckbox 的最大选中值数量?

ios - 使用自动布局在某些单元格中加载图像

ios - UIPageViewController : Swipe registration

ios - 如何将 ImageSliderViewController 转换为 Swift 2

swift - 如何获取 JSON 格式的 Swift REPL 编译器错误

ios - 在 UIView 中逐像素绘制像素

xcode - 如何使用 UIAlertAction 处理程序 : 转到另一个 Storyboard

java - Saml 2.0 签名验证失败

asp.net - 在将文件上传到服务器之前跨浏览器检查客户端的文件大小?