Start simulator app if not already started
Summary: Before this change, launching a simulator would ony show the simulator if the simulator process itself was already running. This makes sure that opening a simulator also works from a closed state Changelog: Automatically start an iOS simulator to launch a device when none is running yet Reviewed By: nikoant Differential Revision: D24919363 fbshipit-source-id: 45039330710cf81aa73222967d667964bb01f42a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c9a278fb0f
commit
dcdec2608e
@@ -188,12 +188,13 @@ export function getSimulators(
|
||||
});
|
||||
}
|
||||
|
||||
export function launchSimulator(udid: string): Promise<any> {
|
||||
return promisify(execFile)(
|
||||
export async function launchSimulator(udid: string): Promise<any> {
|
||||
await promisify(execFile)(
|
||||
'xcrun',
|
||||
['simctl', ...getDeviceSetPath(), 'boot', udid],
|
||||
{encoding: 'utf8'},
|
||||
);
|
||||
await promisify(execFile)('open', ['-a', 'simulator']);
|
||||
}
|
||||
|
||||
function getActiveDevices(idbPath: string): Promise<Array<IOSDeviceParams>> {
|
||||
|
||||
Reference in New Issue
Block a user