[英]Flutter: The application's Info.plist does not contain CFBundleVersion
[英]The bundle's Info.plist does not contain a CFBundleVersion key or its value is not a string
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>
我也有同样的问题。
我通过模拟器菜单 -> 硬件 -> 擦除所有内容和设置来修复它。
也许这是一个模拟器错误。
对我来说,解决方法是向目标添加一个内部版本号。 单击您的目标,转到 General,然后在 Identity 下面是 Build 字段。
您可以使用 agvtool 修复这些错误: https ://developer.apple.com/library/archive/qa/qa1827/_index.html
因此,要解决 CFBundleVersion 问题,请打开终端,转到项目根目录(iOS 项目),然后键入以下命令:
agvtool new-version -all 2.6.9
并点击进入。
只需将构建版本插入您的项目
在代码模式下添加到 info.plist 对我有用
<plist version="1.0">
<string>1.0</string>
</plist>
我只是编辑我的项目的“.plist”文件并添加了一个带有一些值的CFBundleShortVersionString
条目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.