【问题标题】:Flutter : Error while building ipa build in stimulator using mac deviceFlutter:使用mac设备在刺激器中构建ipa时出错
【发布时间】:2021-06-16 08:08:19
【问题描述】:

我是新手,在尝试使用刺激器构建 ios 构建时遇到此错误。 我尝试更改构建和版本号。 扑干净 吊舱安装

Running "flutter pub get" in startup...
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.   
Unable to install 
/Users/apple/AndroidStudioProjects/startup/build/ios/iphonesimulator/Runner.app on 

 This is sometimes caused by a malformed plist file:
 ProcessException: Process exited abnormally:
 An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
 Failed to install the requested application
 The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion.

info.Plist

<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>

【问题讨论】:

    标签: xcode flutter build compiler-errors ios-simulator


    【解决方案1】:

    如错误信息所述:

    应用程序的 Info.plist 不包含 CFBundleVersion。确保您的捆绑包包含 CFBundleVersion。

    把这个放进去应该不错:

    <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string>
    

    如果还没有钥匙,你可能也需要把它放进去:

    <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string>
    

    以下是一些相关信息:

    CFBundleShortVersionString 是版本的公共“名称”(例如:“2.5”或“3.8.1”)。您必须在每次发布时增加它。

    CFBundleVersion 是私有内部版本号。在 AppStore 上看不到它。您必须在每次上传时增加它。这意味着如果你在一个二进制文件上线之前拒绝它,并且你想上传一个新的二进制文件,它会有相同的

    CFBundleShortVersionString 但必须有更高的 CFBundleVersion(例如:public "2.5"、private "2.5",然后二进制拒绝,然后重新上传 private"2.5. 1")

    【讨论】:

    • 它是在创建颤振时自动生成的。除此之外,我在 Pubspec.yaml 中更新了构建版本
    • @sherin 这次您收到不同的错误消息了吗?确保 CFBundleVersion 存在于 Info.plist
    • 我正在更新我的问题。
    猜你喜欢
    • 2021-12-11
    • 2021-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-19
    • 2018-07-01
    相关资源
    最近更新 更多