From 49eeda199760f41ab0b40d876aa9b96a56c7fc12 Mon Sep 17 00:00:00 2001 From: Lawrence Lomax Date: Mon, 12 Jun 2017 07:05:48 -0700 Subject: [PATCH] Don't default bridge by default on Xcode 9 Summary: This isn't necessary any more, so it can be removed. The underlying bridge connection also needs fixing. Reviewed By: antiarchit Differential Revision: D5226868 fbshipit-source-id: aef18a30f0d7f2bac9ed50800bd2e579d84cd78b --- .../FBSimulatorBootConfiguration+Helpers.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/FBSimulatorControl/Configuration/FBSimulatorBootConfiguration+Helpers.m b/FBSimulatorControl/Configuration/FBSimulatorBootConfiguration+Helpers.m index 60671965..fe36bab4 100644 --- a/FBSimulatorControl/Configuration/FBSimulatorBootConfiguration+Helpers.m +++ b/FBSimulatorControl/Configuration/FBSimulatorBootConfiguration+Helpers.m @@ -68,7 +68,15 @@ - (BOOL)shouldConnectBridge { - return ((self.options & FBSimulatorBootOptionsConnectBridge) == FBSimulatorBootOptionsConnectBridge) || self.shouldUseDirectLaunch; + // If the option is flagged it should be used. + if ((self.options & FBSimulatorBootOptionsConnectBridge) == FBSimulatorBootOptionsConnectBridge) { + return YES; + } + // In some versions of Xcode 8, it was possible that a direct launch without a bridge could mean applications would not launch. + if (!FBControlCoreGlobalConfiguration.isXcode9OrGreater && self.shouldUseDirectLaunch) { + return YES; + } + return NO; } #pragma mark Scale