mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Xcode 9 supports running multiple simulators
Summary: Since Xcode 9 you can run multiple simultaneously. And since I believe React Native advocates using the latest version of Xcode, we can safely remove this constraint. Updated the unit tests. Furthermore it can be found in the [Xcode release notes](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/xcode_9/xcode_9.html#//apple_ref/doc/uid/TP40004626-CH8-SW12) that multiple simulators are now supported. This can be tested with the CLI by running `react-native run-ios` twice, but with a different `--simulator` flag, e.g.; react-native run-ios --simulator "iPhone SE" react-native run-ios --simulator "iPhone X" [IOS] [ENHANCEMENT] [local-cli/runIOS/findMatchingSimulator.js] - Allow running multiple simulators Closes https://github.com/facebook/react-native/pull/17284 Differential Revision: D7102790 Pulled By: hramos fbshipit-source-id: 750e7039201e28a1feda2bec1e78144fd9deff98
This commit is contained in:
committed by
Facebook Github Bot
parent
2dc559d1fb
commit
2ad34075f1
@@ -34,14 +34,12 @@ function findMatchingSimulator(simulators, simulatorName) {
|
||||
if (simulator.availability !== '(available)') {
|
||||
continue;
|
||||
}
|
||||
// If there is a booted simulator, we'll use that as instruments will not boot a second simulator
|
||||
if (simulator.state === 'Booted') {
|
||||
if (simulatorName !== null) {
|
||||
console.warn("We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.");
|
||||
}
|
||||
let booted = simulator.state === 'Booted';
|
||||
if (booted && simulatorName === null) {
|
||||
return {
|
||||
udid: simulator.udid,
|
||||
name: simulator.name,
|
||||
booted,
|
||||
version
|
||||
};
|
||||
}
|
||||
@@ -49,6 +47,7 @@ function findMatchingSimulator(simulators, simulatorName) {
|
||||
match = {
|
||||
udid: simulator.udid,
|
||||
name: simulator.name,
|
||||
booted,
|
||||
version
|
||||
};
|
||||
}
|
||||
@@ -57,6 +56,7 @@ function findMatchingSimulator(simulators, simulatorName) {
|
||||
match = {
|
||||
udid: simulator.udid,
|
||||
name: simulator.name,
|
||||
booted,
|
||||
version
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user