From dcdec2608e9b41df38f408640782d4463df3bade Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 12 Nov 2020 16:31:13 -0800 Subject: [PATCH] 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 --- desktop/app/src/dispatcher/iOSDevice.tsx | 5 +++-- desktop/app/src/sandy-chrome/appinspect/PluginList.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop/app/src/dispatcher/iOSDevice.tsx b/desktop/app/src/dispatcher/iOSDevice.tsx index fcd8ac917..587afd188 100644 --- a/desktop/app/src/dispatcher/iOSDevice.tsx +++ b/desktop/app/src/dispatcher/iOSDevice.tsx @@ -188,12 +188,13 @@ export function getSimulators( }); } -export function launchSimulator(udid: string): Promise { - return promisify(execFile)( +export async function launchSimulator(udid: string): Promise { + await promisify(execFile)( 'xcrun', ['simctl', ...getDeviceSetPath(), 'boot', udid], {encoding: 'utf8'}, ); + await promisify(execFile)('open', ['-a', 'simulator']); } function getActiveDevices(idbPath: string): Promise> { diff --git a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx index 9088a0c7a..f94482721 100644 --- a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx @@ -164,7 +164,7 @@ export const PluginList = memo(function PluginList({ + hint="This section shows the plugins that are currently disabled. If a plugin is enabled, you will be able to interact with it. If a plugin is disabled it won't consume resources in Flipper or in the connected application."> {disabledPlugins.map((plugin) => (