Skip to content

Commit

Permalink
guard against building for physical iOS devices in non-release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed May 23, 2023
1 parent 80da3b6 commit ca57328
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/patrol_cli/lib/src/ios/ios_test_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca57328

Please sign in to comment.