Alex Aung
Alex Aung

Reputation: 3159

CocoaPods could not find compatible versions for pod "Flutter": In Podfile: Flutter (from `Flutter`)

After upgrade to flutter 3.1, I can build and run for android but I got the following error for ios. May I know what is the reason for this issue?

Aungs-MBP:ios aungmyooo$ pod install
Analyzing dependencies
firebase_analytics: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Flutter":
  In Podfile:
    Flutter (from `Flutter`)

Specs satisfying the `Flutter (from `Flutter`)` dependency were found, but they required a higher minimum deployment target.

[✓] Flutter (Channel master, 3.1.0-0.0.pre.1279, on macOS 12.4 21F79 darwin-x64, locale en-GB) • Flutter version 3.1.0-0.0.pre.1279 at /Users/aungmyooo/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ddeb0b99c5 (18 hours ago), 2022-06-16 13:53:23 -0700 • Engine revision f8c0dc87bc • Dart version 2.18.0 (build 2.18.0-189.0.dev) • DevTools version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/aungmyooo/Library/Android/sdk • Platform android-32, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) • All Android licenses accepted.

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

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

[✓] Android Studio (version 2021.1) • 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.11+0-b60-7590822)

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

[✓] Connected device (3 available) • SM N975F (mobile) • RF8M82Y3K9A • android-arm64 • Android 12 (API 31) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.115

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!

Upvotes: 15

Views: 18602

Answers (1)

Kaushik Chandru
Kaushik Chandru

Reputation: 17802

In the ios folder -> PodFile. You will see that the version of platform is 9 and is commented. Please uncomment it and set the version to 11.0

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

EDIT - 2024

# Uncomment this line to define a global platform for your project
platform :ios, '13.0'

AS OF APRIL 2024

As of april 2024, it now works with '14.0'

In the top of your Podfile, update to this:

platform :ios, '14.0'

Upvotes: 63

Related Questions