Commit 6073a7e9 authored by Collin Jackson's avatar Collin Jackson

Fall back to the default xcodeproj if a workspace cannot be found (e.g. for example apps)

parent f83ea1ae
...@@ -123,11 +123,20 @@ Future<XcodeBuildResult> buildXcodeProject({ ...@@ -123,11 +123,20 @@ Future<XcodeBuildResult> buildXcodeProject({
'build', 'build',
'-configuration', 'Release', '-configuration', 'Release',
'ONLY_ACTIVE_ARCH=YES', 'ONLY_ACTIVE_ARCH=YES',
'-workspace', 'Runner.xcworkspace',
'-scheme', 'Runner',
"BUILD_DIR=${path.absolute(app.rootPath, 'build')}",
]; ];
List<FileSystemEntity> contents = new Directory(app.rootPath).listSync();
for (FileSystemEntity entity in contents) {
if (path.extension(entity.path) == '.xcworkspace') {
commands.addAll(<String>[
'-workspace', path.basename(entity.path),
'-scheme', path.basenameWithoutExtension(entity.path),
"BUILD_DIR=${path.absolute(app.rootPath, 'build')}",
]);
break;
}
}
if (buildForDevice) { if (buildForDevice) {
commands.addAll(<String>['-sdk', 'iphoneos', '-arch', 'arm64']); commands.addAll(<String>['-sdk', 'iphoneos', '-arch', 'arm64']);
if (!codesign) { if (!codesign) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment