if there is no .ios or ios sub-project, don't attempt building for iOS (#31406)
This commit is contained in:
@@ -306,8 +306,13 @@ abstract class IOSApp extends ApplicationPackage {
|
||||
}
|
||||
|
||||
factory IOSApp.fromIosProject(IosProject project) {
|
||||
if (getCurrentHostPlatform() != HostPlatform.darwin_x64)
|
||||
if (getCurrentHostPlatform() != HostPlatform.darwin_x64) {
|
||||
return null;
|
||||
}
|
||||
// TODO(jonahwilliams): do more verification in this check.
|
||||
if (!project.exists) {
|
||||
return null;
|
||||
}
|
||||
return BuildableIOSApp(project);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +231,9 @@ class IosProject {
|
||||
/// True, if the parent Flutter project is a module project.
|
||||
bool get isModule => parent.isModule;
|
||||
|
||||
/// Whether the flutter application has an iOS project.
|
||||
bool get exists => hostAppRoot.existsSync();
|
||||
|
||||
/// The xcode config file for [mode].
|
||||
File xcodeConfigFor(String mode) => _flutterLibRoot.childDirectory('Flutter').childFile('$mode.xcconfig');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user