website icon indicating copy to clipboard operation
website copied to clipboard

iOS apps installation - cocoapods installation missing steps

Open MatteoMeil opened this issue 3 months ago • 0 comments

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 doctor complaining:

    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 ruby

    emphasis mine. While this approach works, the page doesn't mention the fundamental $PATH update 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 $PATH has been correctly updated:
    which gem
    # Should output /opt/homebrew/opt/ruby/bin/gem
    
  • get gem installation 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.

MatteoMeil avatar Sep 19 '25 13:09 MatteoMeil