facebook / react-native

A framework for building native applications using React

Home Page:https://reactnative.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native run-ios fails with ambiguous simulator targets

MSLaguana opened this issue · comments

I've been trying to use the react-native run-ios command introduced in 0.19.0, and I've run into some issues. It seems to default to launching for iPhone 6, but on my machine there is both an "iPhone 6 (9.0)" and an "iPhone 6 (9.0) + Apple Watch - 38mm (2.0)" which causes ambiguity. The end result of this is the simulator does not change over to the correct device (or start at all if it is not already running) and my app appears to crash on startup since it is targeting a different phone.

I think it would be possible to fix this if instead of constructing
const simulatorFullName = ${selectedSimulator.name} (${selectedSimulator.version});
you did
const simulatorFullName = ${selectedSimulator.name} (${selectedSimulator.version}) [;

which includes the start of the unique device ID and removes the possibility of the watch being involved.

Hey MSLaguana, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

This will be fixed with #6043

I first run iPhone 6 Simulator, then run Visual Studio Code DEBUG IOS success.
I hope to help you.
In Xcode 7.3, react native 0.22.2.

Looks like this got fixed