xcode 包的 Info.plist 不包含 CFBundleVersion 键或其值不是字符串

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43111501/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:52:19  来源:igfitidea点击:

The bundle's Info.plist does not contain a CFBundleVersion key or its value is not a string

iosxcodebuildcompiler-errors

提问by bilaldogan

Xcode is build the project and when build is success, I get this message "The bundle's Info.plist does not contain a CFBundleVersion key or its value is not a string". What is that mean. There is my info.plist:

Xcode 正在构建项目,当构建成功时,我收到此消息“捆绑包的 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></key>
    <string></string>
    <key>Additional_Version_String</key>
    <string>Updated on build</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIcons</key>
    <dict/>
    <key>CFBundleIcons~ipad</key>
    <dict/>
    <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>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>Commit_Short_Hash</key>
    <string>Updated on build</string>
    <key>ITSAppUsesNonExemptEncryption</key>
    <false/>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSContactsUsageDescription</key>
    <string>Vialer needs access to your contacts to make calling to your contacts possible</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Vialer needs access to your microphone to make calling possible</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
        <string>fetch</string>
        <string>remote-notification</string>
        <string>voip</string>
    </array>
    <key>UIMainStoryboardFile</key>
    <string>MainStoryboard</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UIRequiresPersistentWiFi</key>
    <true/>
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleBlackTranslucent</string>
    <key>UIStatusBarTintParameters</key>
    <dict>
        <key>UINavigationBar</key>
        <dict>
            <key>Style</key>
            <string>UIBarStyleDefault</string>
            <key>Translucent</key>
            <true/>
        </dict>
    </dict>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <true/>
</dict>
</plist>

采纳答案by Hardik Vyas

I have the same issue with CFBuildVersion and than i found that in my project Target there is no build version inserted.

我对 CFBuildVersion 有同样的问题,然后我发现在我的项目 Target 中没有插入构建版本。

So i have just inserted build version and issue solved. enter image description here

所以我刚刚插入了构建版本并解决了问题。 在此处输入图片说明

回答by iDevOrz

I have the same problem.

我也有同样的问题。

I fix it by Simulator menu -> Hardware -> Erase All Content and Setting.

我通过模拟器菜单 -> 硬件 -> 擦除所有内容和设置来修复它。

Maybe it's a Simulator bug.

也许这是一个模拟器错误。

回答by flexaargo

The fix for me was to add a build number to the target. Click on your target, go to General, then underneath Identity is a field for Build.

我的解决方法是向目标添加内部版本号。单击您的目标,转到 General,然后 Identity 下方是 Build 字段。

回答by ArtiomLK

I followed solutions from everywhere and these are the steps I ended up with that worked for me:

我遵循了来自世界各地的解决方案,这些是我最终采用的对我有用的步骤:

Solution:

解决方案:

  1. Open the terminal and fix any relevant issues flutter doctordisplays:
  1. 打开终端并修复任何相关问题flutter doctor显示:

flutter doctor

扑医生

  1. Run flutter clean
  1. flutter clean

enter image description here

在此处输入图片说明

  1. Delete the Podfile, Podfile.lock and the Pods directory from your ios project
  1. 从你的 ios 项目中删除 Podfile、Podfile.lock 和 Pods 目录

enter image description here

在此处输入图片说明

  1. Open the Runner.xcworkspaceproject in Xcode
  1. Runner.xcworkspace在 Xcode 中打开项目

enter image description here

在此处输入图片说明

  1. Update the build number as @Hardik Vyas mentioned
  1. 如@Hardik Vyas 提到的那样更新内部版本号

enter image description here

在此处输入图片说明

  1. As @iDevOrz mentioned, Erase All Content and Settings from the simulator
  1. 正如@iDevOrz 提到的,从模拟器中擦除所有内容和设置

enter image description here

在此处输入图片说明

  1. Clean, build and run the app in Xcode
  1. 在 Xcode 中清理、构建和运行应用程序

回答by Ehsan sarshar

Just Insert the build version to your project

只需将构建版本插入到您的项目中