title: Flutter 2 upgrade: CocoaPods not installed or not in valid state
body: <p>After updating Flutter 2, I can no longer deploy my application on IOS:</p>
  <pre><code>Warning: CocoaPods minimum required version 1.9.0 or greater not installed.
  Skipping pod install.
    CocoaPods is used to retrieve the iOS and macOS platform side's plugin code
    that responds to your plugin usage on the Dart side.
    Without CocoaPods, plugins will not work on iOS or macOS.
    For more info, see https://flutter.dev/platform-plugins
  To upgrade see
  https://guides.cocoapods.org/using/getting-started.html#installation for
  instructions.
  
  CocoaPods not installed or not in valid state.
  Error launching application on iPhone 11.
  </code></pre>
  <h2>What I have tried so far:</h2>
  <ul>
  <li>Because I user Flavors: <a href="https://github.com/flutter/flutter/issues/17749#issuecomment-615279343" rel="nofollow noreferrer">method</a></li>
  <li>gem list</li>
  <li>sudo gem uninstall cocoapods</li>
  <li>sudo gem install cocoapods</li>
  <li>pod install</li>
  <li>flutter clean + flutter pub upgrade/repair + remove Derived Data, Podfile.lock, Pods</li>
  <li>Restart/Launch from vsCode &amp; Xcode</li>
  </ul>
  <h2>cocoapods version</h2>
  <pre><code>$ gem which cocoapods
  /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods.rb
  </code></pre>
  <h2>pod version</h2>
  <pre><code>$ pod --version                                                                                                                                                      
  1.8.4
  </code></pre>
  <h2>flutter doctor</h2>
  <pre><code>Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel stable, 2.0.2, on macOS 11.2.3 20D91 darwin-x64, locale en-FR)
  [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
  [!] Xcode - develop for iOS and macOS
      ! CocoaPods 1.8.4 out of date (1.10.0 is recommended).
          CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
          Without CocoaPods, plugins will not work on iOS or macOS.
          For more info, see https://flutter.dev/platform-plugins
        To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
  [✓] Chrome - develop for the web
  [✓] Android Studio (version 3.5)
  [✓] VS Code (version 1.54.3)
  [✓] Connected device (3 available)
  </code></pre>
  <p>I have installed / uninstalled cocoapods several times but flutter does not seem to detect the latest version</p>