1 | /**
|
2 | * Copyright (c) Facebook, Inc. and its affiliates.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | */
|
8 | import { Device } from '../types';
|
9 | /**
|
10 | * Takes in a parsed simulator list and a desired name, and returns an object with the matching simulator. The desired
|
11 | * name can optionally include the iOS version in between parenthesis after the device name. Ex: "iPhone 6 (9.2)" in
|
12 | * which case it'll attempt to find a simulator with the exact version specified.
|
13 | *
|
14 | * If the simulatorString argument is null, we'll go into default mode and return the currently booted simulator,
|
15 | * the last booted simulator or
|
16 | * if none is booted, it will be the first in the list.
|
17 | *
|
18 | * @param simulators a parsed list from `xcrun simctl list --json devices` command
|
19 | * @param findOptions null or an object containing:
|
20 | * ```
|
21 | * {
|
22 | * simulator: name of desired simulator
|
23 | * udid: udid of desired simulator
|
24 | * }
|
25 | * ```
|
26 | * If null, it will use the currently booted simulator, or if none are booted, the first in the list.
|
27 | */
|
28 | declare function findMatchingSimulator(simulators: {
|
29 | devices: {
|
30 | [index: string]: Array<Device>;
|
31 | };
|
32 | }, findOptions?: null | {
|
33 | simulator?: string;
|
34 | udid?: string;
|
35 | }): {
|
36 | udid: string;
|
37 | name: string;
|
38 | booted: boolean;
|
39 | version: string;
|
40 | } | null;
|
41 | export default findMatchingSimulator;
|
42 | //# sourceMappingURL=findMatchingSimulator.d.ts.map |
\ | No newline at end of file |