From 3a9956fb4ebd37d77d40fab51f216361b3dcddb5 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 21 Mar 2016 13:22:53 -0700 Subject: [PATCH] Bump engine revision and ensure the Xcode project setup expects assets at the archive root. --- bin/cache/engine.version | 2 +- .../lib/src/ios/setup_xcodeproj.dart | 20 +++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/bin/cache/engine.version b/bin/cache/engine.version index fd2fcbb848..4bdb9db5c0 100644 --- a/bin/cache/engine.version +++ b/bin/cache/engine.version @@ -1 +1 @@ -dcbd64e460d922b9b7b86235db1472fef89933e7 +646500663e7db5deaab2d0a8a96ace2b29d0da27 diff --git a/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart b/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart index 6284ce5492..f9853b6771 100644 --- a/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart @@ -63,24 +63,14 @@ Future _inflateXcodeArchive(String directory, List 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; }