From 0eedec47c22ace328bba31a72c0b7fbb28928603 Mon Sep 17 00:00:00 2001 From: Viraj Kanwade Date: Fri, 11 Oct 2024 23:23:13 -0700 Subject: [PATCH] Updated iPhone enable developer mode instructions (#154511) The instructions specify to enable Developer Mode in Privacy and Security. But Developer Mode option is not available, unless you open Xcode and reconnect the device. ___________ 9/23 edit from @andrewkolos: See https://stackoverflow.com/questions/77648341/flutter-not-reading-device-developer-mode-setting --- .../flutter_tools/lib/src/runner/target_devices.dart | 4 +++- .../test/general.shard/runner/target_devices_test.dart | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/flutter_tools/lib/src/runner/target_devices.dart b/packages/flutter_tools/lib/src/runner/target_devices.dart index a639096bd9..92e802e89a 100644 --- a/packages/flutter_tools/lib/src/runner/target_devices.dart +++ b/packages/flutter_tools/lib/src/runner/target_devices.dart @@ -29,7 +29,9 @@ String _foundSpecifiedDevicesMessage(int count, String deviceId) => String _noMatchingDeviceMessage(String deviceId) => 'No supported devices found with name or id ' "matching '$deviceId'."; String flutterSpecifiedDeviceDevModeDisabled(String deviceName) => 'To use ' - "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security."; + "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security on the device. " + 'If this does not work, open Xcode, reconnect the device, and look for a ' + 'popup on the device asking you to trust this computer.'; String flutterSpecifiedDeviceUnpaired(String deviceName) => "'$deviceName' is not paired. " 'Open Xcode and trust this computer when prompted.'; diff --git a/packages/flutter_tools/test/general.shard/runner/target_devices_test.dart b/packages/flutter_tools/test/general.shard/runner/target_devices_test.dart index 5e5add9670..184d79a3db 100644 --- a/packages/flutter_tools/test/general.shard/runner/target_devices_test.dart +++ b/packages/flutter_tools/test/general.shard/runner/target_devices_test.dart @@ -1267,8 +1267,8 @@ target-device (mobile) • xxx • ios • iOS 16 (unsupported) final List? devices = await targetDevices.findAllTargetDevices(); - expect(logger.statusText, equals(''' -To use 'target-device' for development, enable Developer Mode in Settings → Privacy & Security. + expect(logger.statusText, equals(r''' +To use 'target-device' for development, enable Developer Mode in Settings → Privacy & Security on the device. If this does not work, open Xcode, reconnect the device, and look for a popup on the device asking you to trust this computer. ''')); expect(devices, isNull); }); @@ -1279,7 +1279,7 @@ To use 'target-device' for development, enable Developer Mode in Settings → Pr final List? devices = await targetDevices.findAllTargetDevices(); expect(logger.statusText, equals(''' -To use 'target-device-1' for development, enable Developer Mode in Settings → Privacy & Security. +To use 'target-device-1' for development, enable Developer Mode in Settings → Privacy & Security on the device. If this does not work, open Xcode, reconnect the device, and look for a popup on the device asking you to trust this computer. Checking for wireless devices... ''')); expect(devices, isNotNull); @@ -1292,8 +1292,8 @@ Checking for wireless devices... final List? devices = await targetDevices.findAllTargetDevices(); expect(logger.statusText, equals(''' -To use 'target-device-1' for development, enable Developer Mode in Settings → Privacy & Security. -To use 'target-device-2' for development, enable Developer Mode in Settings → Privacy & Security. +To use 'target-device-1' for development, enable Developer Mode in Settings → Privacy & Security on the device. If this does not work, open Xcode, reconnect the device, and look for a popup on the device asking you to trust this computer. +To use 'target-device-2' for development, enable Developer Mode in Settings → Privacy & Security on the device. If this does not work, open Xcode, reconnect the device, and look for a popup on the device asking you to trust this computer. No devices found yet. Checking for wireless devices... No supported devices found with name or id matching 'target-device'.