From ce5527513e014a511cabe37c9b9e9e4594bb2e2f Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Mon, 27 Nov 2023 08:42:12 -0800 Subject: [PATCH] only simulators in "Virtual device" Summary: Currently if you plug in a physical iOS device via USB, flipper will show it to you in "Virtual device menu". See "ak iphone mini" in the test plan. This diff ensures that we only show virtual device in this menu. Reviewed By: lblasa Differential Revision: D51588117 fbshipit-source-id: e2853a6b34ed3fe6d821a9c504b9ffd19e4074fa --- .../src/sandy-chrome/appinspect/LaunchEmulator.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx index 2bf708c89..185ed421f 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -122,8 +122,12 @@ export const LaunchEmulatorDialog = withTrackingScope( 'ios-get-simulators', false, ); + + const nonPhysical = simulators.filter( + (simulator) => simulator.type !== 'physical', + ); setWaitingForIos(false); - setIosEmulators(simulators); + setIosEmulators(nonPhysical); } catch (error) { console.warn('Failed to find iOS simulators', error); setiOSMessage(`Error: ${error.message ?? error} \nRetrying...`);