From 8d56fae557de4a3d4710f07eb99e4a19557b5736 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 6 Jul 2016 13:13:28 -0700 Subject: [PATCH] Finish integrating HelloServices model on iOS (#4820) This patch changes the default `flutter create` command to generate a HelloServices-style app on iOS. As a consequence, the Atom integration now fully works with HelloServices. --- examples/hello_services/ios/.gitignore | 1 + .../project.pbxproj | 32 +- .../contents.xcworkspacedata | 0 .../{HelloServices => Runner}/AppDelegate.h | 0 .../{HelloServices => Runner}/AppDelegate.m | 0 .../AppIcon.appiconset/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 0 .../ios/{HelloServices => Runner}/Info.plist | 4 +- .../LocationProvider.h | 0 .../LocationProvider.m | 0 .../ios/{HelloServices => Runner}/main.m | 0 .../lib/src/application_package.dart | 4 +- packages/flutter_tools/lib/src/ios/mac.dart | 12 +- .../lib/src/ios/setup_xcodeproj.dart | 52 +-- packages/flutter_tools/lib/src/run.dart | 2 +- .../project.pbxproj | 396 ------------------ .../xcschemes/Application.xcscheme | 101 ----- .../xcshareddata/xcschemes/Framework.xcscheme | 80 ---- .../templates/build-ios/Runner/main.m | 12 - .../templates/create/ios.tmpl/.gitignore | 38 ++ .../ios.tmpl}/Flutter/Flutter.xcconfig | 0 .../ios.tmpl/Runner.xcodeproj/project.pbxproj | 381 +++++++++++++++++ .../contents.xcworkspacedata | 2 +- .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/Icon-60@2x.png | Bin .../AppIcon.appiconset/Icon-60@3x.png | Bin .../AppIcon.appiconset/Icon-76.png | Bin .../AppIcon.appiconset/Icon-76@2x.png | Bin .../AppIcon.appiconset/Icon-83.5@2x.png | Bin .../AppIcon.appiconset/Icon-Small-40.png | Bin .../AppIcon.appiconset/Icon-Small-40@2x.png | Bin .../AppIcon.appiconset/Icon-Small-40@3x.png | Bin .../AppIcon.appiconset/Icon-Small.png | Bin .../AppIcon.appiconset/Icon-Small@2x.png | Bin .../AppIcon.appiconset/Icon-Small@3x.png | Bin .../AppIcon.appiconset/icon_128x128.png | Bin .../AppIcon.appiconset/icon_128x128@2x.png | Bin .../AppIcon.appiconset/icon_16x16.png | Bin .../AppIcon.appiconset/icon_16x16@2x.png | Bin .../AppIcon.appiconset/icon_256x256.png | Bin .../AppIcon.appiconset/icon_256x256@2x.png | Bin .../AppIcon.appiconset/icon_32x32.png | Bin .../AppIcon.appiconset/icon_32x32@2x.png | Bin .../AppIcon.appiconset/icon_512x512.png | Bin .../AppIcon.appiconset/icon_512x512@2x.png | Bin .../Base.lproj/LaunchScreen.storyboard} | 4 +- .../Runner/Base.lproj/Main.storyboard | 25 ++ .../{ios => ios.tmpl/Runner}/Info.plist.tmpl | 8 +- .../templates/create/ios.tmpl/Runner/main.m | 14 + 50 files changed, 490 insertions(+), 678 deletions(-) rename examples/hello_services/ios/{HelloServices.xcodeproj => Runner.xcodeproj}/project.pbxproj (94%) rename examples/hello_services/ios/{HelloServices.xcodeproj => Runner.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename examples/hello_services/ios/{HelloServices => Runner}/AppDelegate.h (100%) rename examples/hello_services/ios/{HelloServices => Runner}/AppDelegate.m (100%) rename examples/hello_services/ios/{HelloServices => Runner}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename examples/hello_services/ios/{HelloServices => Runner}/Base.lproj/LaunchScreen.storyboard (100%) rename examples/hello_services/ios/{HelloServices => Runner}/Base.lproj/Main.storyboard (100%) rename examples/hello_services/ios/{HelloServices => Runner}/Info.plist (94%) rename examples/hello_services/ios/{HelloServices => Runner}/LocationProvider.h (100%) rename examples/hello_services/ios/{HelloServices => Runner}/LocationProvider.m (100%) rename examples/hello_services/ios/{HelloServices => Runner}/main.m (100%) delete mode 100644 packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.pbxproj delete mode 100644 packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Application.xcscheme delete mode 100644 packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme delete mode 100644 packages/flutter_tools/templates/build-ios/Runner/main.m create mode 100644 packages/flutter_tools/templates/create/ios.tmpl/.gitignore rename packages/flutter_tools/templates/{build-ios => create/ios.tmpl}/Flutter/Flutter.xcconfig (100%) create mode 100644 packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.pbxproj rename packages/flutter_tools/templates/{build-ios/FlutterApplication.xcodeproj => create/ios.tmpl/Runner.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (66%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Contents.json (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-60@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-60@3x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-76.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-76@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-83.5@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small-40.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small-40@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small-40@3x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/Icon-Small@3x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_128x128.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_128x128@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_16x16.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_16x16@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_256x256.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_256x256@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_32x32.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_32x32@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_512x512.png (100%) rename packages/flutter_tools/templates/create/{ios/Assets.xcassets.tmpl => ios.tmpl/Runner/Assets.xcassets}/AppIcon.appiconset/icon_512x512@2x.png (100%) rename packages/flutter_tools/templates/create/{ios/LaunchScreen.storyboard.tmpl => ios.tmpl/Runner/Base.lproj/LaunchScreen.storyboard} (84%) create mode 100644 packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/Main.storyboard rename packages/flutter_tools/templates/create/{ios => ios.tmpl/Runner}/Info.plist.tmpl (89%) create mode 100644 packages/flutter_tools/templates/create/ios.tmpl/Runner/main.m diff --git a/examples/hello_services/ios/.gitignore b/examples/hello_services/ios/.gitignore index f1521f66c94..fc394654569 100644 --- a/examples/hello_services/ios/.gitignore +++ b/examples/hello_services/ios/.gitignore @@ -35,3 +35,4 @@ Icon? /Flutter/app.zip /Flutter/Flutter.framework /Flutter/Generated.xcconfig +/ServiceDefinitions.json diff --git a/examples/hello_services/ios/HelloServices.xcodeproj/project.pbxproj b/examples/hello_services/ios/Runner.xcodeproj/project.pbxproj similarity index 94% rename from examples/hello_services/ios/HelloServices.xcodeproj/project.pbxproj rename to examples/hello_services/ios/Runner.xcodeproj/project.pbxproj index a2ea9eadf82..95ada8c096a 100644 --- a/examples/hello_services/ios/HelloServices.xcodeproj/project.pbxproj +++ b/examples/hello_services/ios/Runner.xcodeproj/project.pbxproj @@ -46,7 +46,7 @@ 977505181CFDF23500BC28DA /* LocationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationProvider.m; sourceTree = ""; }; 97A38A331CFDEC680099F1B4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 97A38A341CFDEC880099F1B4 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* HelloServices.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloServices.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -82,7 +82,7 @@ isa = PBXGroup; children = ( 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* HelloServices */, + 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, ); sourceTree = ""; @@ -90,12 +90,12 @@ 97C146EF1CF9000F007C117D /* Products */ = { isa = PBXGroup; children = ( - 97C146EE1CF9000F007C117D /* HelloServices.app */, + 97C146EE1CF9000F007C117D /* Runner.app */, ); name = Products; sourceTree = ""; }; - 97C146F01CF9000F007C117D /* HelloServices */ = { + 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( 97C146FA1CF9000F007C117D /* Main.storyboard */, @@ -108,7 +108,7 @@ 977505171CFDF21E00BC28DA /* LocationProvider.h */, 977505181CFDF23500BC28DA /* LocationProvider.m */, ); - path = HelloServices; + path = Runner; sourceTree = ""; }; 97C146F11CF9000F007C117D /* Supporting Files */ = { @@ -122,9 +122,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* HelloServices */ = { + 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "HelloServices" */; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( 9740EEB61CF901F6004384FC /* ShellScript */, 97C146EA1CF9000F007C117D /* Sources */, @@ -136,9 +136,9 @@ ); dependencies = ( ); - name = HelloServices; - productName = HelloServices; - productReference = 97C146EE1CF9000F007C117D /* HelloServices.app */; + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -155,7 +155,7 @@ }; }; }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "HelloServices" */; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -168,7 +168,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 97C146ED1CF9000F007C117D /* HelloServices */, + 97C146ED1CF9000F007C117D /* Runner */, ); }; /* End PBXProject section */ @@ -334,7 +334,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - INFOPLIST_FILE = HelloServices/Info.plist; + INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -355,7 +355,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - INFOPLIST_FILE = HelloServices/Info.plist; + INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -369,7 +369,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "HelloServices" */ = { + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( 97C147031CF9000F007C117D /* Debug */, @@ -378,7 +378,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "HelloServices" */ = { + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( 97C147061CF9000F007C117D /* Debug */, diff --git a/examples/hello_services/ios/HelloServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/hello_services/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/hello_services/ios/HelloServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to examples/hello_services/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/examples/hello_services/ios/HelloServices/AppDelegate.h b/examples/hello_services/ios/Runner/AppDelegate.h similarity index 100% rename from examples/hello_services/ios/HelloServices/AppDelegate.h rename to examples/hello_services/ios/Runner/AppDelegate.h diff --git a/examples/hello_services/ios/HelloServices/AppDelegate.m b/examples/hello_services/ios/Runner/AppDelegate.m similarity index 100% rename from examples/hello_services/ios/HelloServices/AppDelegate.m rename to examples/hello_services/ios/Runner/AppDelegate.m diff --git a/examples/hello_services/ios/HelloServices/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/hello_services/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/hello_services/ios/HelloServices/Assets.xcassets/AppIcon.appiconset/Contents.json rename to examples/hello_services/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/hello_services/ios/HelloServices/Base.lproj/LaunchScreen.storyboard b/examples/hello_services/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/hello_services/ios/HelloServices/Base.lproj/LaunchScreen.storyboard rename to examples/hello_services/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/examples/hello_services/ios/HelloServices/Base.lproj/Main.storyboard b/examples/hello_services/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from examples/hello_services/ios/HelloServices/Base.lproj/Main.storyboard rename to examples/hello_services/ios/Runner/Base.lproj/Main.storyboard diff --git a/examples/hello_services/ios/HelloServices/Info.plist b/examples/hello_services/ios/Runner/Info.plist similarity index 94% rename from examples/hello_services/ios/HelloServices/Info.plist rename to examples/hello_services/ios/Runner/Info.plist index 40c6215d906..29a848ecc89 100644 --- a/examples/hello_services/ios/HelloServices/Info.plist +++ b/examples/hello_services/ios/Runner/Info.plist @@ -7,11 +7,11 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.example.HelloServices CFBundleInfoDictionaryVersion 6.0 CFBundleName - $(PRODUCT_NAME) + HelloServices CFBundlePackageType APPL CFBundleShortVersionString diff --git a/examples/hello_services/ios/HelloServices/LocationProvider.h b/examples/hello_services/ios/Runner/LocationProvider.h similarity index 100% rename from examples/hello_services/ios/HelloServices/LocationProvider.h rename to examples/hello_services/ios/Runner/LocationProvider.h diff --git a/examples/hello_services/ios/HelloServices/LocationProvider.m b/examples/hello_services/ios/Runner/LocationProvider.m similarity index 100% rename from examples/hello_services/ios/HelloServices/LocationProvider.m rename to examples/hello_services/ios/Runner/LocationProvider.m diff --git a/examples/hello_services/ios/HelloServices/main.m b/examples/hello_services/ios/Runner/main.m similarity index 100% rename from examples/hello_services/ios/HelloServices/main.m rename to examples/hello_services/ios/Runner/main.m diff --git a/packages/flutter_tools/lib/src/application_package.dart b/packages/flutter_tools/lib/src/application_package.dart index ae3d5df2dff..07f6ccb20a1 100644 --- a/packages/flutter_tools/lib/src/application_package.dart +++ b/packages/flutter_tools/lib/src/application_package.dart @@ -96,13 +96,13 @@ class IOSApp extends ApplicationPackage { if (getCurrentHostPlatform() != HostPlatform.darwin_x64) return null; - String plistPath = path.join('ios', 'Info.plist'); + String plistPath = path.join('ios', 'Runner', 'Info.plist'); String value = getValueFromFile(plistPath, kCFBundleIdentifierKey); if (value == null) return null; return new IOSApp( - projectDir: path.join('ios', '.generated'), + projectDir: path.join('ios'), projectBundleId: value ); } diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 163b05f8d77..962ced7835b 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -105,16 +105,7 @@ Future buildXcodeProject({ bool codesign: true }) async { String flutterProjectPath = Directory.current.path; - - if (xcodeProjectRequiresUpdate(mode, target)) { - printTrace('Initializing the Xcode project.'); - if ((await setupXcodeProjectHarness(flutterProjectPath, mode, target)) != 0) { - printError('Could not initialize the Xcode project.'); - return new XcodeBuildResult(false); - } - } else { - updateXcodeGeneratedProperties(flutterProjectPath, mode, target); - } + updateXcodeGeneratedProperties(flutterProjectPath, mode, target); if (!_checkXcodeVersion()) return new XcodeBuildResult(false); @@ -130,7 +121,6 @@ Future buildXcodeProject({ 'xcodebuild', 'clean', 'build', - '-target', 'Runner', '-configuration', 'Release', 'ONLY_ACTIVE_ARCH=YES', ]; diff --git a/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart b/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart index 6cf48bfd078..210dbf80544 100644 --- a/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart @@ -2,16 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:async'; import 'dart:io'; import 'package:path/path.dart' as path; -import '../base/file_system.dart' show copyFolderSync; import '../build_info.dart'; import '../cache.dart'; import '../globals.dart'; -import '../version.dart'; void updateXcodeGeneratedProperties(String projectPath, BuildMode mode, String target) { StringBuffer localsBuffer = new StringBuffer(); @@ -37,54 +34,7 @@ void updateXcodeGeneratedProperties(String projectPath, BuildMode mode, String t if (tools.isLocalEngine) localsBuffer.writeln('LOCAL_ENGINE=${tools.engineBuildPath}'); - File localsFile = new File(path.join(projectPath, 'ios', '.generated', 'Flutter', 'Generated.xcconfig')); + File localsFile = new File(path.join(projectPath, 'ios', 'Flutter', 'Generated.xcconfig')); localsFile.createSync(recursive: true); localsFile.writeAsStringSync(localsBuffer.toString()); } - -bool xcodeProjectRequiresUpdate(BuildMode mode, String target) { - File revisionFile = new File(path.join(Directory.current.path, 'ios', '.generated', 'REVISION')); - - // If the revision stamp does not exist, the Xcode project definitely requires - // an update - if (!revisionFile.existsSync()) { - printTrace("A revision stamp does not exist. The Xcode project has never been initialized."); - return true; - } - - if (revisionFile.readAsStringSync() != _getCurrentXcodeRevisionString(mode, target)) { - printTrace("The revision stamp and the Flutter engine revision differ or the build mode has changed."); - printTrace("Project needs to be updated."); - return true; - } - - printTrace("Xcode project is up to date."); - return false; -} - -Future setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode, String target) async { - // Step 1: Copy templates into user project directory - String iosFilesPath = path.join(flutterProjectPath, 'ios'); - String xcodeProjectPath = path.join(iosFilesPath, '.generated'); - String templatesPath = path.join(Cache.flutterRoot, 'packages', 'flutter_tools', 'templates', 'build-ios'); - copyFolderSync(templatesPath, xcodeProjectPath); - - // Step 2: Populate the Generated.xcconfig with project specific paths - updateXcodeGeneratedProperties(flutterProjectPath, mode, target); - - // Step 3: Write the REVISION file - File revisionFile = new File(path.join(xcodeProjectPath, 'REVISION')); - revisionFile.createSync(); - revisionFile.writeAsStringSync(_getCurrentXcodeRevisionString(mode, target)); - - // Step 4: Tell the user the location of the generated project. - printStatus('Xcode project created in $iosFilesPath/.'); - - return 0; -} - -String _getCurrentXcodeRevisionString(BuildMode mode, String target) => (new StringBuffer() - ..write('${FlutterVersion.getVersion().frameworkRevision}') - ..write('-${tools.isLocalEngine ? tools.engineBuildPath : getModeName(mode)}') - ..write('::$target') - ).toString(); diff --git a/packages/flutter_tools/lib/src/run.dart b/packages/flutter_tools/lib/src/run.dart index efa7ce23035..c5805cfec4e 100644 --- a/packages/flutter_tools/lib/src/run.dart +++ b/packages/flutter_tools/lib/src/run.dart @@ -413,7 +413,7 @@ String getMissingPackageHintForPlatform(TargetPlatform platform) { case TargetPlatform.android_x64: return 'Is your project missing an android/AndroidManifest.xml?\nConsider running "flutter create ." to create one.'; case TargetPlatform.ios: - return 'Is your project missing an ios/Info.plist?\nConsider running "flutter create ." to create one.'; + return 'Is your project missing an ios/Runner/Info.plist?\nConsider running "flutter create ." to create one.'; default: return null; } diff --git a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.pbxproj b/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.pbxproj deleted file mode 100644 index 0579cd5cc89..00000000000 --- a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.pbxproj +++ /dev/null @@ -1,396 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 976042271CFB91C5006EFB43 /* Flutter.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; }; - 9760422B1CFB925B006EFB43 /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 976042281CFB925B006EFB43 /* app.flx */; }; - 9760422D1CFB925B006EFB43 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9760422A1CFB925B006EFB43 /* Flutter.framework */; }; - 9760422E1CFB92B0006EFB43 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9760422A1CFB925B006EFB43 /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9766DC6F1CFB93D50041C027 /* app.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9766DC6D1CFB93C80041C027 /* app.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 9E07CFA91BE8280A00BCD8DE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */; }; - 9E07CFBA1BE82DFF00BCD8DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E07CF9D1BE8280A00BCD8DE /* main.m */; }; - 9EA2FB801C6D2D6B00670B03 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9E07CFB91BE82D2600BCD8DE /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 9766DC6F1CFB93D50041C027 /* app.dylib in Embed Frameworks */, - 9760422E1CFB92B0006EFB43 /* Flutter.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 976042261CFB91C5006EFB43 /* Flutter.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Flutter.xcconfig; path = Flutter/Flutter.xcconfig; sourceTree = ""; }; - 976042281CFB925B006EFB43 /* app.flx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = app.flx; path = Flutter/app.flx; sourceTree = ""; }; - 9760422A1CFB925B006EFB43 /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; - 9766DC6D1CFB93C80041C027 /* app.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = app.dylib; path = Flutter/app.dylib; sourceTree = ""; }; - 9E07CF9A1BE8280A00BCD8DE /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9E07CF9D1BE8280A00BCD8DE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ../Assets.xcassets; sourceTree = SOURCE_ROOT; }; - 9E07CFAD1BE8280A00BCD8DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = SOURCE_ROOT; }; - 9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ../LaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9E07CF971BE8280A00BCD8DE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9760422D1CFB925B006EFB43 /* Flutter.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 976042251CFB918B006EFB43 /* Flutter */ = { - isa = PBXGroup; - children = ( - 9766DC6D1CFB93C80041C027 /* app.dylib */, - 976042281CFB925B006EFB43 /* app.flx */, - 9760422A1CFB925B006EFB43 /* Flutter.framework */, - 976042261CFB91C5006EFB43 /* Flutter.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 9E07CF7C1BE7F4D200BCD8DE = { - isa = PBXGroup; - children = ( - 976042251CFB918B006EFB43 /* Flutter */, - 9E07CF9B1BE8280A00BCD8DE /* Runner */, - 9E07CF871BE7F4D200BCD8DE /* Products */, - ); - sourceTree = ""; - }; - 9E07CF871BE7F4D200BCD8DE /* Products */ = { - isa = PBXGroup; - children = ( - 9E07CF9A1BE8280A00BCD8DE /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 9E07CF9B1BE8280A00BCD8DE /* Runner */ = { - isa = PBXGroup; - children = ( - 9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */, - 9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */, - 9E07CFAD1BE8280A00BCD8DE /* Info.plist */, - 9E07CF9C1BE8280A00BCD8DE /* Supporting Files */, - ); - path = Runner; - sourceTree = ""; - }; - 9E07CF9C1BE8280A00BCD8DE /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9E07CF9D1BE8280A00BCD8DE /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9E07CF991BE8280A00BCD8DE /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9E07CFB01BE8280A00BCD8DE /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 977A86B01CF4C31F00432945 /* ShellScript */, - 9E07CF961BE8280A00BCD8DE /* Sources */, - 9E07CF971BE8280A00BCD8DE /* Frameworks */, - 9E07CF981BE8280A00BCD8DE /* Resources */, - 9E07CFB91BE82D2600BCD8DE /* Embed Frameworks */, - 9EA2FB831C6E940F00670B03 /* Copy Native Service Assets */, - 9E046CD71C9CA1AC00A1E391 /* Copy Extra Assets */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 9E07CF9A1BE8280A00BCD8DE /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9E07CF7D1BE7F4D200BCD8DE /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = Flutter; - TargetAttributes = { - 9E07CF991BE8280A00BCD8DE = { - CreatedOnToolsVersion = 7.1; - }; - }; - }; - buildConfigurationList = 9E07CF801BE7F4D200BCD8DE /* Build configuration list for PBXProject "FlutterApplication" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 9E07CF7C1BE7F4D200BCD8DE; - productRefGroup = 9E07CF871BE7F4D200BCD8DE /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9E07CF991BE8280A00BCD8DE /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9E07CF981BE8280A00BCD8DE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9760422B1CFB925B006EFB43 /* app.flx in Resources */, - 976042271CFB91C5006EFB43 /* Flutter.xcconfig in Resources */, - 9EA2FB801C6D2D6B00670B03 /* LaunchScreen.storyboard in Resources */, - 9E07CFA91BE8280A00BCD8DE /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 977A86B01CF4C31F00432945 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh"; - }; - 9E046CD71C9CA1AC00A1E391 /* Copy Extra Assets */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Extra Assets"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "RESOURCES_DIR=${SOURCE_ROOT}/../Resources\nAPPLICATION_BUNDLE=${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}\n\nshopt -s dotglob\n\nif [ -d \"${RESOURCES_DIR}\" ]; then\n ditto ${RESOURCES_DIR}/ ${APPLICATION_BUNDLE}\nfi\n"; - showEnvVarsInLog = 0; - }; - 9EA2FB831C6E940F00670B03 /* Copy Native Service Assets */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Native Service Assets"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "SERVICE_FRAMEWORKS_DIR=${SOURCE_ROOT}/Frameworks\nSERVICE_DEFINITIONS=${SOURCE_ROOT}/ServiceDefinitions.json\nAPPLICATION_BUNDLE=${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}\n\n# Copy Service Dylibs\nif [ -d \"${SERVICE_FRAMEWORKS_DIR}\" ]; then\nditto ${SERVICE_FRAMEWORKS_DIR} ${APPLICATION_BUNDLE}/Frameworks\nfi\n\nif [[ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" ]]; then\n\n# Codesign Service Dylibs if an identity is provided.\nDYLIBS=\"${APPLICATION_BUNDLE}/Frameworks/*.dylib\"\nfor dylib in $DYLIBS; do\nxcrun codesign \\\n --force \\\n --sign ${EXPANDED_CODE_SIGN_IDENTITY} \\\n --preserve-metadata=identifier,entitlements \\\n --timestamp=none \\\n \"${dylib}\" \\\n\ndone\n\nfi\n\n# Copy Service Definitions\nif [ -f \"${SERVICE_DEFINITIONS}\" ]; then\ncp ${SERVICE_DEFINITIONS} ${APPLICATION_BUNDLE}/\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9E07CF961BE8280A00BCD8DE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9E07CFBA1BE82DFF00BCD8DE /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 9E07CF8C1BE7F4D200BCD8DE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9E07CF8D1BE7F4D200BCD8DE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = NO; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9E07CFAE1BE8280A00BCD8DE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Tools/common", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = ../Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/FlutterApplication/Generated", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 9E07CFAF1BE8280A00BCD8DE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Tools/common", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = ../Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/FlutterApplication/Generated", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9E07CF801BE7F4D200BCD8DE /* Build configuration list for PBXProject "FlutterApplication" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9E07CF8C1BE7F4D200BCD8DE /* Debug */, - 9E07CF8D1BE7F4D200BCD8DE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9E07CFB01BE8280A00BCD8DE /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9E07CFAE1BE8280A00BCD8DE /* Debug */, - 9E07CFAF1BE8280A00BCD8DE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9E07CF7D1BE7F4D200BCD8DE /* Project object */; -} diff --git a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Application.xcscheme b/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Application.xcscheme deleted file mode 100644 index 935ff09c82d..00000000000 --- a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Application.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme deleted file mode 100644 index a8458122cbc..00000000000 --- a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/flutter_tools/templates/build-ios/Runner/main.m b/packages/flutter_tools/templates/build-ios/Runner/main.m deleted file mode 100644 index 1ddb5c2a7f5..00000000000 --- a/packages/flutter_tools/templates/build-ios/Runner/main.m +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import -#import - -int main(int argc, const char* argv[]) { - FlutterInit(argc, argv); - return UIApplicationMain(argc, (char**)argv, nil, - NSStringFromClass([FlutterAppDelegate class])); -} diff --git a/packages/flutter_tools/templates/create/ios.tmpl/.gitignore b/packages/flutter_tools/templates/create/ios.tmpl/.gitignore new file mode 100644 index 00000000000..fc394654569 --- /dev/null +++ b/packages/flutter_tools/templates/create/ios.tmpl/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +*.lock +profile + +DerivedData/ +build/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/app.flx +/Flutter/app.dylib +/Flutter/app.zip +/Flutter/Flutter.framework +/Flutter/Generated.xcconfig +/ServiceDefinitions.json diff --git a/packages/flutter_tools/templates/build-ios/Flutter/Flutter.xcconfig b/packages/flutter_tools/templates/create/ios.tmpl/Flutter/Flutter.xcconfig similarity index 100% rename from packages/flutter_tools/templates/build-ios/Flutter/Flutter.xcconfig rename to packages/flutter_tools/templates/create/ios.tmpl/Flutter/Flutter.xcconfig diff --git a/packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.pbxproj b/packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..8e904dcf075 --- /dev/null +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,381 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 9705A1C51CF9049000538489 /* app.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEB81CF902C7004384FC /* app.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9740EEB41CF90195004384FC /* Flutter.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; }; + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; + 9740EEBB1CF902C7004384FC /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 9705A1C51CF9049000538489 /* app.dylib in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 9740EEB21CF90195004384FC /* Flutter.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Flutter.xcconfig; path = Flutter/Flutter.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 9740EEB71CF902C7004384FC /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Flutter/app.flx; sourceTree = ""; }; + 9740EEB81CF902C7004384FC /* app.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = app.dylib; path = Flutter/app.dylib; sourceTree = ""; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 9740EEB71CF902C7004384FC /* app.flx */, + 9740EEB81CF902C7004384FC /* app.dylib */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Flutter.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* ShellScript */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9740EEBB1CF902C7004384FC /* app.flx in Resources */, + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, + 9740EEB41CF90195004384FC /* Flutter.xcconfig in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 9740EEB61CF901F6004384FC /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C146F31CF9000F007C117D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.Runner; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.Runner; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 66% rename from packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 560d61a2a55..6cec59cc956 100644 --- a/packages/flutter_tools/templates/build-ios/FlutterApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:Runner.xcodeproj"> diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Contents.json b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Contents.json rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-60@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-60@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-60@3x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-60@3x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-76.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-76.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-76@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-76@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-83.5@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-83.5@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40@3x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small-40@3x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small@3x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/Icon-Small@3x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_128x128.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_128x128.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_128x128.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_128x128.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_128x128@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_128x128@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_16x16.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_16x16.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_16x16.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_16x16.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_16x16@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_16x16@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_256x256.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_256x256.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_256x256.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_256x256.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_256x256@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_256x256@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_32x32.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_32x32.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_32x32.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_32x32.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_32x32@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_32x32@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_512x512.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_512x512.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_512x512.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_512x512.png diff --git a/packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_512x512@2x.png b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png similarity index 100% rename from packages/flutter_tools/templates/create/ios/Assets.xcassets.tmpl/AppIcon.appiconset/icon_512x512@2x.png rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png diff --git a/packages/flutter_tools/templates/create/ios/LaunchScreen.storyboard.tmpl b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/LaunchScreen.storyboard similarity index 84% rename from packages/flutter_tools/templates/create/ios/LaunchScreen.storyboard.tmpl rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/LaunchScreen.storyboard index 78686cd0750..ebf48f60397 100644 --- a/packages/flutter_tools/templates/create/ios/LaunchScreen.storyboard.tmpl +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/Main.storyboard b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..f56d2f3bb56 --- /dev/null +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/flutter_tools/templates/create/ios/Info.plist.tmpl b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Info.plist.tmpl similarity index 89% rename from packages/flutter_tools/templates/create/ios/Info.plist.tmpl rename to packages/flutter_tools/templates/create/ios.tmpl/Runner/Info.plist.tmpl index 88a6066be8c..9e1253264d2 100644 --- a/packages/flutter_tools/templates/create/ios/Info.plist.tmpl +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner/Info.plist.tmpl @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion en CFBundleExecutable - Runner + $(EXECUTABLE_NAME) CFBundleIdentifier {{iosIdentifier}} CFBundleInfoDictionaryVersion @@ -24,6 +24,8 @@ UILaunchStoryboardName LaunchScreen + UIMainStoryboardFile + Main UIRequiredDeviceCapabilities arm64 @@ -41,7 +43,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIViewControllerBasedStatusBarAppearance - + UIViewControllerBasedStatusBarAppearance + diff --git a/packages/flutter_tools/templates/create/ios.tmpl/Runner/main.m b/packages/flutter_tools/templates/create/ios.tmpl/Runner/main.m new file mode 100644 index 00000000000..f43358c6966 --- /dev/null +++ b/packages/flutter_tools/templates/create/ios.tmpl/Runner/main.m @@ -0,0 +1,14 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +int main(int argc, char * argv[]) { + FlutterInit(argc, (const char**)argv); + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([FlutterAppDelegate class])); + } +}