flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
161.08k stars 26.39k forks source link

[Ios] The application's Info.plist does not contain a valid CFBundleVersion. #128174

Closed Patrick386 closed 9 months ago

Patrick386 commented 9 months ago

Is there an existing issue for this?

Steps to reproduce

  1. ios run

Expected results

Error launching application on iPhone 14.

Actual results

Unable to install /Users/patrick386/development/pronto/build/ios/iphonesimulator/Runner.app on 35FC9EF0-A1B7-4E3F-988B-6488783A5868. 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 a valid CFBundleVersion.
Ensure your bundle contains a valid CFBundleVersion.
  Command: /usr/bin/arch -arm64e xcrun simctl install 35FC9EF0-A1B7-4E3F-988B-6488783A5868 /Users/patrick386/development/pronto/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone 14.

Code sample

Code sample ```dart [none] ```

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Logs

Logs ``` Unable to install /Users/patrick386/development/pronto/build/ios/iphonesimulator/Runner.app on 35FC9EF0-A1B7-4E3F-988B-6488783A5868. 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 a valid CFBundleVersion. Ensure your bundle contains a valid CFBundleVersion. Command: /usr/bin/arch -arm64e xcrun simctl install 35FC9EF0-A1B7-4E3F-988B-6488783A5868 /Users/patrick386/development/pronto/build/ios/iphonesimulator/Runner.app Error launching application on iPhone 14. ``` **This is not a solution.** https://github.com/flutter/flutter/issues/34477
스크린샷 2023-06-04 오전 1 46 58

Flutter Doctor output

Doctor output ```console [[✓] Flutter (Channel stable, 3.10.2, on macOS 13.0 22A380 darwin-arm64 (Rosetta), locale ko-KR) • Flutter version 3.10.2 on channel stable at /Users/patrick386/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 9cd3d0d9ff (11 days ago), 2023-05-23 20:57:28 -0700 • Engine revision 90fa3ae28f • Dart version 3.0.2 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/patrick386/Library/Android/sdk • Platform android-32, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Ultimate Edition (version 2022.2.4) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 74.0.2 • Dart plugin version 222.4582 [✓] VS Code (version 1.71.1) • VS Code at /Users/patrick386/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.58.0 [✓] VS Code (version 1.75.1) • VS Code at /Users/patrick386/Visual Studio Code.app/Contents • Flutter extension version 3.58.0 [✓] Connected device (3 available) • iPhone 14 (mobile) • 35FC9EF0-A1B7-4E3F-988B-6488783A5868 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.0 22A380 darwin-arm64 (Rosetta) • Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126 [✓] Network resources • All expected network resources are available. • No issues found! ] ```
Patrick386 commented 9 months ago

This is not a solution. https://github.com/flutter/flutter/issues/34477

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>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Pronto</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>pronto</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>UIApplicationSupportsIndirectInputEvents</key>
    <true/>
</dict>
</plist>
darshankawar commented 9 months ago

Thanks for the report @Patrick386 I am unable to replicate this using a demo app. Can you try by creating a new Flutter app and see if you still get same error ?

The error message does give a suggestion on how to fix it:

Ensure your bundle contains a valid CFBundleVersion.
  Command: /usr/bin/arch -arm64e xcrun simctl install 35FC9EF0-A1B7-4E3F-988B-6488783A5868 /Users/patrick386/development/pronto/build/ios/iphonesimulator/Runner.app
github-actions[bot] commented 9 months ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 8 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.