Error Message
'pod install' command failed with code 1.
Error message:
Analyzing dependencies
Please, check that podfile contains following lines in header:
source 'https://cdn.cocoapods.org'
Please, check that each target depended on shared contains following dependencies:
Solution
https://youtrack.jetbrains.com/issue/KT-49418
- Install ruby 2.7 via homebrew brew install ruby@2.7 (because the newest ruby can't install the latest cocoapods-generate)
- Add Installed ruby to your zsh configuration echo 'export /opt/homebrew/opt/ruby@2.7/bin:/opt/homebrew/lib/ruby/gems/2.7.0/bin:$PATH' >> ~/.zshrc
- Restart your shell and Android Studio/IDEA to apply the changes from .zshrc
- Check what ruby version is used in your terminal or/and Android Studio by executing which ruby (should be $(brew --prefix)/opt/ruby@2.7/bin/ruby)
- Install CocoaPods sudo gem install -n /usr/local/bin cocoapods
- Check where CocoaPods are installed which pod (should be /usr/local/bin/pod)
- Install cocoapods-generate sudo gem install -n /usr/local/bin cocoapods-generate