CocoaPods not installed or not in valid state. Error launching application on iPhone 〇〇.に出会ったときにやったこと。

結論

【Flutter】エラーCocoaPods not installed. 〜が表示されiosビルドできない

のやり方で解決。

エラー内容

Running "flutter pub get" in book_recomender...
Launching lib/main.dart on iPhone 13 in debug mode...
Upgrading Info.plist
Warning: CocoaPods 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 install 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 13.

なんとなく、Flutterのversionのstaibleが3.0に上がったことが関係してそうな予感。

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.2.1 21D62 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
[✓] VS Code (version 1.63.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

以下の記事を参考にしたところ解決しました。

【Flutter】エラーCocoaPods not installed. 〜が表示されiosビルドできない
flutter clean
flutter pub get
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.podspec
rm ios/Podfile
pod repo update

ただ、現状としては以下のような警告が出ています。

../development/flutter/.pub-cache/hosted/pub.dartlang.org/swipable_stack-1.3.0/lib/src/swipable_stack.dart:293:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../development/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((_) {

コメント

タイトルとURLをコピーしました