make sure we exit early if the Runner.xcodeproj file is missing (#31591)
diff --git a/packages/flutter_tools/test/application_package_test.dart b/packages/flutter_tools/test/application_package_test.dart
index 20f3d29..ccd83c6 100644
--- a/packages/flutter_tools/test/application_package_test.dart
+++ b/packages/flutter_tools/test/application_package_test.dart
@@ -285,6 +285,15 @@
expect(iosApp, null);
}, overrides: overrides);
+
+ testUsingContext('returns null when there is no Runner.xcodeproj', () async {
+ fs.file('pubspec.yaml').createSync();
+ fs.file('.packages').createSync();
+ fs.file('ios/FooBar.xcodeproj').createSync(recursive: true);
+ final BuildableIOSApp iosApp = IOSApp.fromIosProject((await FlutterProject.fromDirectory(fs.currentDirectory)).ios);
+
+ expect(iosApp, null);
+ }, overrides: overrides);
});
}