Skip to content

Commit

Permalink
fix(ios): fix getSimulators for Xcode 10+ tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
ludufre authored and tlancina committed Jun 5, 2019
1 parent aecd04d commit 605164a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ios/utils/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const debug = Debug('native-run:ios:utils:simulator');

export interface Simulator {
availability: '(available)' | '(unavailable)';
isAvailable: boolean;
name: string; // "iPhone 5";
state: string; // "Shutdown"
udid: string;
Expand Down Expand Up @@ -49,7 +50,7 @@ export async function getSimulators() {
return output.runtimes
.filter(runtime => runtime.name.indexOf('watch') === -1 && runtime.name.indexOf('tv') === -1)
.map(runtime => output.devices[runtime.identifier]
.filter(device => !device.availability.includes('unavailable'))
.filter(device => device.isAvailable)
.map(device => ({ ...device, runtime }))
)
.reduce((prev, next) => prev.concat(next)) // flatten
Expand Down

0 comments on commit 605164a

Please sign in to comment.