Merge pull request #2819 from chinmaygarde/master

Bump engine revision and ensure the Xcode project setup expects assets at the archive root.
This commit is contained in:
Chinmay Garde 2016-03-21 13:42:22 -07:00
commit adf48bef7e
2 changed files with 6 additions and 16 deletions

View File

@ -1 +1 @@
dcbd64e460d922b9b7b86235db1472fef89933e7 646500663e7db5deaab2d0a8a96ace2b29d0da27

View File

@ -63,23 +63,13 @@ Future<bool> _inflateXcodeArchive(String directory, List<int> archiveBytes) asyn
// Cleanup the temp directory after unzipping // Cleanup the temp directory after unzipping
runSync(['/bin/rm', '-rf', tempDir.path]); runSync(['/bin/rm', '-rf', tempDir.path]);
Directory flutterDir = new Directory(path.join(directory, 'Flutter')); // Verify that we have an Xcode project
bool flutterDirExists = await flutterDir.exists(); Directory flutterProj = new Directory(path.join(directory, 'FlutterApplication.xcodeproj'));
if (!flutterDirExists) bool flutterProjExists = await flutterProj.exists();
return false; if (!flutterProjExists) {
printError("${flutterProj.path} does not exist");
// Move contents of the Flutter directory one level up
// There is no dart:io API to do this. See https://github.com/dart-lang/sdk/issues/8148
for (FileSystemEntity file in flutterDir.listSync()) {
try {
runCheckedSync(['/bin/mv', file.path, directory]);
} catch (error) {
return false; return false;
} }
}
runSync(['/bin/rm', '-rf', flutterDir.path]);
return true; return true;
} }