UNPKG

1.67 kBTypeScriptView Raw
1import { SimulatorDevice } from '../SimControl';
2export declare function isEnabled(): boolean;
3export declare class CoreSimulatorError extends Error {
4 message: string;
5 code?: "MALFORMED_BINARY" | "INVALID_UDID" | undefined;
6 constructor(message: string, code?: "MALFORMED_BINARY" | "INVALID_UDID" | undefined);
7}
8export declare function listDevicesAsync(): Promise<SimulatorDevice[]>;
9export declare function getDeviceInfoAsync({ udid, }?: {
10 udid?: string;
11}): Promise<SimulatorDevice>;
12export declare function devicePlistToSimulatorDevice(deviceDirectory: string, data: any): SimulatorDevice;
13/**
14 * Get UDID for the first booted simulator. It's unclear if this is the exact method used by `xcrun simctl` to determine which device is "booted".
15 *
16 * @returns EFEEA6EF-E3F5-4EDE-9B72-29EAFA7514AE
17 */
18export declare function getBootedDeviceAsync(): Promise<{
19 UDID: string;
20} | null>;
21/**
22 * Returns the local path for the installed binary.app on a given Apple simulator. Returns null when the app isn't installed.
23 *
24 * This can be used as a replacement for `xcrun simctl get_app_container <udid> <bundleIdentifier>` but it's over 200x faster.
25 *
26 * @param props.udid device udid.
27 * @param props.bundleIdentifier bundle identifier for app
28 * @returns local file path to installed app binary, e.g. '/Users/evanbacon/Library/Developer/CoreSimulator/Devices/EFEEA6EF-E3F5-4EDE-9B72-29EAFA7514AE/data/Containers/Bundle/Application/FA43A0C6-C2AD-442D-B8B1-EAF3E88CF3BF/Exponent-2.21.3.tar.app'
29 */
30export declare function getContainerPathAsync({ udid, bundleIdentifier, }: {
31 udid: string;
32 bundleIdentifier: string;
33}): Promise<string | null>;