iOS apps installation - cocoapods installation missing steps
Page URL
https://docs.flutter.dev/get-started/install/macos/mobile-ios/
Page source
https://github.com/flutter/website/tree/main/src/content/get-started/install/macos/mobile-ios.md
Describe the problem
Steps described in page to install cocoapods are incomplete. Also, the linked install guide is contradictory:
-
here it states:
We recommend you use the default ruby
emphasis mine. Following this approach leads to
flutter doctorcomplaining:CocoaPods installed but not working
-
while here it states
we recommend not using the system provided Ruby and instead installing a newer Ruby [...] with
brew install rubyemphasis mine. While this approach works, the page doesn't mention the fundamental
$PATHupdate step.
Expected fix
The page should enlist all the steps necessary to install cocoapods such as flutter doctor doesn't detect issues.
Steps I took to make it work:
- install newer ruby via Homebrew:
brew install ruby - update
$PATH:export PATH="/opt/homebrew/opt/ruby/bin:$PATH" - check that
$PATHhas been correctly updated:which gem # Should output /opt/homebrew/opt/ruby/bin/gem - get
geminstallation directory:gem environment home # Should output /opt/homebrew/lib/ruby/gems/3.4.0 - include it in
$PATH:export PATH=GEM_ENVIRONMENT_HOME_OUTPUT/bin:$PATH - install
cocoapods:gem install cocoapods
Additional context
Tested on MacBook Air M4
I would like to fix this problem.
- [ ] I will try and fix this problem on docs.flutter.dev.