Skip to content

run-ios wants my sudo password because it wont accept pod installed with bundler #2668

Description

@buschco

Environment

info Fetching system and libraries information...
System:
OS: macOS 15.5
CPU: (14) arm64 Apple M4 Pro
Memory: 1.52 GB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.5
path: ~/.nvm/versions/node/v18.20.5/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v18.20.5/bin/yarn
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v18.20.5/bin/npm
Watchman: Not Found
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12550806
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.3
path: /Users/colin/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.7.6
path: /Users/colin/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Description

I think the program fails to fast. instead it should try bundle exec pod --version first since on other places it will also respect the bundle installed version.

Reproducible Demo

  1. make sure no cocoapods is not installed globally: gem uninstall cocoapods
  2. npx @react-native-community/cli@latest init MyApp
  3. press n for cocoa pods question
  4. cd MyApp
  5. bundle install

Now bundle exec pod --version has an 0 exit code.

npx react-native run-ios --force-pods will either fail or globally install cocoapods again, but it does not need to since we can use bundle exec pod instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions