0

I have been trying to use Firebase. After trying to run the app on the IOS simulator, it giving this error

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 12 Pro Max.

The problem is also I cannot run flutter doctor since even if it is in the path it saying flutter command not found and I have tried every solution in vain.

I went on to try removing pod file and reinstalling it using pod install and everything worked well but still it is not working. I updated cocoapods using brew because it wasn't working using gem and did the the same to ruby but still it is not working I don't know which piece of the project I should show Any help will be appreciated.

Jimmyjbk
  • 351
  • 3
  • 20

1 Answers1

1

I encounter the same problem regularly.

The solutions if found here usually work for me: https://stackoverflow.com/a/64676861/6704033

Solution: 1

Following this command to update your pod

  1. flutter clean
  2. pod repo update
  3. deleted /ios/Pods/ and /ios/Podfile.lock
  4. run pod install

Solution: 2

  1. first pod repo update
  2. rm -rf Podfile.lock
  3. pod install

Also restarting my IDE fixes it sometimes.

Er1
  • 2,559
  • 1
  • 12
  • 24