Skip to content

iOS apps installation - cocoapods installation missing steps #12446

@MatteoMeil

Description

@MatteoMeil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    e2-daysEffort: < 5 daysfrom.page-issueReported in a reader-filed concernp1-highMajor but not urgent concern: Resolve in months. Update each month.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions