Skip to content

react-native build-ios error: unknown option '--device' #2473

Closed

Description

@jenskuhrjorgensen

Environment

System:
  OS: macOS 14.6.1
  CPU: (11) arm64 Apple M3 Pro
  Memory: 65.16 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.3.0
    path: ~/.nvm/versions/node/v22.3.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.8.1
    path: ~/.nvm/versions/node/v22.3.0/bin/npm
  Watchman:
    version: 2024.06.24.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/be9276/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Users/be9276/.jenv/shims/javac
  Ruby:
    version: 3.2.3
    path: /Users/be9276/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Description

Regression:

npx react-native build-ios --device no longer works with the --device option:

error: unknown option '--device'

This used to work in react-native v0.71 but not in either react-native v0.73, v0.74 or v0.75

Reproducible Demo

  1. git clone https://github.com/jenskuhrjorgensen/react_native-build-ios-error.git
  2. cd react_native-build-ios-error/ReproducerApp
  3. npm i
  4. npx react-native build-ios --device --mode Debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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