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 bf896a4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 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,15 @@ class IOSTestBackend {

Process process;

// Running on physical iOS devices is possible only in release mode
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 bf896a4

Please sign in to comment.