From ca57328fce965aeb1af1624b39e381268a74d90e Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Tue, 23 May 2023 10:01:30 +0200 Subject: [PATCH] guard against building for physical iOS devices in non-release mode --- packages/patrol_cli/lib/src/ios/ios_test_backend.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/patrol_cli/lib/src/ios/ios_test_backend.dart b/packages/patrol_cli/lib/src/ios/ios_test_backend.dart index 0f218c246..26252e915 100644 --- a/packages/patrol_cli/lib/src/ios/ios_test_backend.dart +++ b/packages/patrol_cli/lib/src/ios/ios_test_backend.dart @@ -72,6 +72,14 @@ class IOSTestBackend { Process process; + final isRealDevice = !options.simulator; + final isReleaseMode = options.flutter.buildMode == BuildMode.release; + if (isRealDevice && !isReleaseMode) { + throwToolExit( + 'Running on physical iOS devices is possible only in release mode', + ); + } + // flutter build ios --config-only var flutterBuildKilled = false;