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,24 +63,14 @@ Future<bool> _inflateXcodeArchive(String directory, List<int> archiveBytes) asyn
// Cleanup the temp directory after unzipping
runSync(['/bin/rm', '-rf', tempDir.path]);
Directory flutterDir = new Directory(path.join(directory, 'Flutter'));
bool flutterDirExists = await flutterDir.exists();
if (!flutterDirExists)
// Verify that we have an Xcode project
Directory flutterProj = new Directory(path.join(directory, 'FlutterApplication.xcodeproj'));
bool flutterProjExists = await flutterProj.exists();
if (!flutterProjExists) {
printError("${flutterProj.path} does not exist");
return false;
// 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;
}
}
runSync(['/bin/rm', '-rf', flutterDir.path]);
return true;
}