Skip to content

No longer possible to use the CLI to launch an app on Apple TV #1927

@douglowder

Description

@douglowder

Environment

info Fetching system and libraries information...
System:
  OS: macOS 12.6.5
  CPU: (10) arm64 Apple M1 Max
  Memory: 3.37 GB / 64.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 18.13.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.yarn/bin/yarn
  npm:
    version: 8.19.3
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.11.3
    path: /Users/dlowder/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.2
      - iOS 16.2
      - macOS 13.1
      - tvOS 16.1
      - watchOS 9.1
  Android SDK:
    API Levels:
      - "26"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
    Build Tools:
      - 26.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 32.1.0
      - 33.0.0
    System Images:
      - android-25 | Google APIs ARM 64 v8a
      - android-26 | Google APIs Intel x86 Atom_64
      - android-31 | Android TV ARM 64 v8a
      - android-31 | ARM 64 v8a
      - android-31 | Google APIs ARM 64 v8a
      - android-31 | Google Play ARM 64 v8a
      - android-32 | Google APIs ARM 64 v8a
      - android-32 | Google Play ARM 64 v8a
      - android-33 | Android TV ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.1 AI-221.6008.13.2211.9619390
  Xcode:
    version: 14.2/14C18
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.16.1
    path: /usr/bin/javac
  Ruby:
    version: 2.7.7
    path: /Users/dlowder/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 11.2.0
    wanted: ^11.2.0
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native: Not Found
  react-native-macos: Not Found
  react-native-tvos:
    installed: 0.71.7-0rc1
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: false

Description

It used to be that

npx react-native run-ios --scheme=MyApp-tvOS --simulator="Apple TV"

worked correctly when building apps with the React Native TV repo.

Now, this command fails because it cannot find a matching simulator.

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ id:14727BE0-55EB-4DB6-AC40-3B11B3E66F8B }

	Available destinations for the "MyApp-tvOS" scheme:
		{ platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device }
		{ platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Any tvOS Simulator Device }
		{ platform:tvOS, id:fc278c52b29dac08bf50aa40a76ac39e810e8c54, name:Doug dev TV }
		{ platform:tvOS Simulator, id:2996D07E-5C4D-4FCB-9686-93E90A1D741D, OS:15.2, name:Apple TV }
		{ platform:tvOS Simulator, id:FEB20D19-9E38-4943-939E-6141B3DF5CED, OS:16.0, name:Apple TV }
		{ platform:tvOS Simulator, id:6999154E-23B8-40F1-A69E-5721458BD99D, OS:16.1, name:Apple TV }
		{ platform:tvOS Simulator, id:C9EE0829-CFD4-4119-AD77-4812C4E1058E, OS:15.2, name:Apple TV 4K (2nd generation) }
		{ platform:tvOS Simulator, id:EC880B0E-7E81-4C07-86BD-CE0AB84003A4, OS:16.0, name:Apple TV 4K (2nd generation) }
		{ platform:tvOS Simulator, id:33FD6B0E-7032-4FE4-8CDB-770314302BFE, OS:16.1, name:Apple TV 4K (3rd generation) }
		{ platform:tvOS Simulator, id:7247EAEF-3898-4DC7-A9B8-6666AD66D87F, OS:16.1, name:Apple TV 4K (3rd generation) (at 1080p) }
		{ platform:tvOS Simulator, id:D5C61178-2DCF-4C0A-AF2A-9A47897E308A, OS:15.2, name:Apple TV 4K (at 1080p) (2nd generation) }
		{ platform:tvOS Simulator, id:ABA63AD3-0537-469A-BACE-E796AC2C1F21, OS:16.0, name:Apple TV 4K (at 1080p) (2nd generation) }
]

It appears that the ability to run on tvOS was removed, most likely in #1823 .

Reproducible Demo

  • Execute
react-native init RN69TV --template=react-native-tvos --skip-install
  • Edit RN69TV/package.json and add resolutions to make sure the latest CLI is used:
"resolutions": {
    "@react-native-community/cli": "^11.2.0",
    "@react-native-community/cli-platform-ios": "^11.2.0"
  }
  • Then install dependencies and attempt to run the app on Apple TV:
cd RN69TV
yarn
npx pod-install
npx react-native run-ios --scheme=RN69TV-tvOS --simulator="Apple TV"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions