Commit 5cebf70d authored by Chinmay Garde's avatar Chinmay Garde

`flutter start` initializes the Xcode project if the user has not already done so.

parent d38bfee6
......@@ -13,7 +13,7 @@ import '../android/android.dart' as android;
import '../artifacts.dart';
import '../base/globals.dart';
import '../dart/pub.dart';
import 'ios.dart';
import '../ios/initialize_xcode.dart';
class CreateCommand extends Command {
final String name = 'create';
......
......@@ -17,6 +17,7 @@ import '../build_configuration.dart';
import '../device.dart';
import '../services.dart';
import '../toolchain.dart';
import '../ios/initialize_xcode.dart';
import 'simulator.dart';
const String _ideviceinstallerInstructions =
......@@ -560,8 +561,11 @@ String _getIOSEngineRevision(ApplicationPackage app) {
Future<bool> _buildIOSXcodeProject(ApplicationPackage app, { bool buildForDevice }) async {
if (!FileSystemEntity.isDirectorySync(app.localPath)) {
printError('Path "${path.absolute(app.localPath)}" does not exist.\nDid you run `flutter ios --init`?');
return false;
printTrace('Path "${path.absolute(app.localPath)}" does not exist. Initializing the Xcode project.');
if ((await initializeXcodeProjectHarness()) != 0) {
printError('Could not initialize the Xcode project.');
return false;
}
}
if (!_validateEngineRevision(app))
......
This diff is collapsed.
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