Home > Blockchain >  CocoaPods not installed. Skipping pod install
CocoaPods not installed. Skipping pod install

Time:01-27

My app was working fine until I did 2 small changes.

  1. On Target runner in Xcode I enabled bitcode for the project.
  2. I update the Android studio to the latest version.

Android Studio Bumblebee | 2021.1.1 Build #AI-211.7628.21.2111.8092744, built on January 19, 2022 Runtime version: 11.0.11 0-b60-7590822 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 4 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: Dart (211.7798), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), io.flutter (63.2.2)

After that When I run my flutter app on iOS simulator I'm getting this error. Although I have disabled bitcode and tried again.I got same error. I installed and reinstalled cocapoads still same error. I don't know what causing this error. Can you help? please

 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.

CodePudding user response:

This might happen because AndroidStudio doesn't know anything about $PATH provided in ~/.*rc files (.bashrc,.zshrc, etc.)

You can ensure by launching it from terminal:

open /Applications/Android\ Studio.app

In order to provide $PATH for apps launched from macOS UI (dock/launchpad icons) - use ~/.profile;

  1. Install CocoaPod (doesn't really matter be it brew/rvm/etc.).
  2. Find where CocoaPods is installed on your machine:
# find where your 'pod' binary is located:
which pod  
# example output: /Users/yourname/.gem/ruby-{xyz}/bin/pod
  1. Append this path to your ~/.profile
# ~/.profile:

...

export PATH="$PATH:/Users/yourname/.gem/ruby-{xyz}/bin"

...
  1. Log Out from macOS to apply changes

CodePudding user response:

I got exception on pod availability check.

which pod

https://github.com/flutter/flutter/blob/e028d0f046c20c61b7c7c8a23bc456f337410658/packages/flutter_tools/lib/src/macos/cocoapods.dart#L114-L115

It seems that $PATH env for updated studio is not picked properly. (you can check it by enable verbose logging mode on flutter plugin).

Workaround is to start Android studio from terminal:

open /Applications/Android\ Studio.app 

(so $PATH env setup properly for me, i stopped research for now, may be someone can resolve.)

  •  Tags:  
  • Related