Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Fix running cordova build ios for emulators with Xcode 10.1 RELEASE #451

Merged
merged 2 commits into from
Nov 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bin/templates/scripts/cordova/lib/list-emulator-build-targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ function listEmulatorBuildTargets () {
var availableDevices = Object.keys(devices).reduce(function (availAcc, deviceCategory) {
var availableDevicesInCategory = devices[deviceCategory];
availableDevicesInCategory.forEach(function (device) {
if (device.name === deviceType.name.replace(/\-inch/g, ' inch') &&
device.availability.toLowerCase().indexOf('unavailable') < 0) {
if (device.name === deviceType.name.replace(/\-inch/g, ' inch')) {
// Check new flag isAvailable (XCode 10.1+) or legacy string availability (XCode 10 and lower)
if (device.isAvailable || (device.availability && device.availability.toLowerCase().indexOf('unavailable') < 0)) {
availAcc.push(device);
}
}
});
return availAcc;
}, []);
Expand Down