Flutter cannot publish to iOS with XCode 13

Viewed 5126

I want to update my App, but I can't validate it on XCode 13. There is always the error "Invalid Bundle. The bundle Runner.app/Frameworks/Flutter.framework does not support the minimum OS Version specified in the Info.plist."

I changed everything to MinimumOSVersion: iOS 13.0, but I just can't find the error.

flutter doctor -v

[✓] Flutter (Channel master, 2.6.0-6.0.pre.172, on macOS 11.4 20F71 darwin-x64, locale en-AT) • Flutter version 2.6.0-6.0.pre.172 at /Users/mdigruber/flutter • Upstream repository git@github.com:flutter/flutter.git • Framework revision a921c1cf3d (5 hours ago), 2021-09-22 20:11:19 +0530 • Engine revision b0f3c0f7e4 • Dart version 2.15.0 (build 2.15.0-127.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/mdigruber/Library/Android/sdk • Platform android-30, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.10.1

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.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.8+10-b944.6916264)

[✓] VS Code (version 1.60.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.26.0

[✓] Connected device (1 available) • Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82

• No issues found!

4 Answers

Do your need set MinimumOSVersion IOS 13 ? I usually set MinimumOSVersion as required by the package which i use in project and usually is 10.0 You can try add code below in end of Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
        end
  end
end

MY SOLUTION

1.- flutter channel stable

2.- flutter upgrade

3.- flutter clean

4.- change IOS DEPLOYMENT TARGET 9.0

5.- change DEPLOYMENT INFO 9.0

6.- BUILD -> ARCHIVE -> AND VALIDATE :)

enter image description here

  1. Go to this site - https://docs.flutter.dev/development/tools/sdk/releases?tab=macos
  2. Download flutter version 2.5.3
  3. unzip downloaded file by double clicking on it
  4. Move that file to location where your previous flutter folder is ( before this make sure you delete old flutter folder)
  5. export PATH="$PATH:pwd/flutter/bin" run this command to reset bath
  6. Run flutter doctor

Basically we downgraded flutter version manually to version which supported catalina.

It seems to be a problem in the flutter package. A flutter upgrade solved the problem for my case.

flutter upgrade

Upgrading Flutter to 2.6.0-12.0.pre.136 from 2.6.0-12.0.pre.46...

Don't forget the flutter clean.

Related