diff --git a/examples/flutter_view/ios/Runner.xcodeproj/project.pbxproj b/examples/flutter_view/ios/Runner.xcodeproj/project.pbxproj index 3a95c89319..42d6b8fca4 100644 --- a/examples/flutter_view/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/flutter_view/ios/Runner.xcodeproj/project.pbxproj @@ -403,7 +403,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flutterView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Profile; }; @@ -531,7 +531,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flutterView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -553,7 +553,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flutterView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj b/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj index d232ae046e..e3a2df201f 100644 --- a/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj @@ -332,7 +332,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Profile; }; @@ -464,7 +464,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -489,7 +489,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/examples/platform_channel_swift/ios/Runner/AppDelegate.swift b/examples/platform_channel_swift/ios/Runner/AppDelegate.swift index b8cbd2e456..04ca367664 100644 --- a/examples/platform_channel_swift/ios/Runner/AppDelegate.swift +++ b/examples/platform_channel_swift/ios/Runner/AppDelegate.swift @@ -25,7 +25,7 @@ enum MyFlutterErrorCode { override func application( _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { GeneratedPluginRegistrant.register(with: self) guard let controller = window?.rootViewController as? FlutterViewController else { fatalError("rootViewController is not type FlutterViewController") diff --git a/packages/flutter_tools/templates/app/ios-swift.tmpl/Runner/AppDelegate.swift b/packages/flutter_tools/templates/app/ios-swift.tmpl/Runner/AppDelegate.swift index 71cc41e34e..70693e4a8c 100644 --- a/packages/flutter_tools/templates/app/ios-swift.tmpl/Runner/AppDelegate.swift +++ b/packages/flutter_tools/templates/app/ios-swift.tmpl/Runner/AppDelegate.swift @@ -5,7 +5,7 @@ import Flutter @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) diff --git a/packages/flutter_tools/test/project_test.dart b/packages/flutter_tools/test/project_test.dart index 6273421879..c52508480a 100644 --- a/packages/flutter_tools/test/project_test.dart +++ b/packages/flutter_tools/test/project_test.dart @@ -245,7 +245,7 @@ void main() { final FlutterProject project = await someProject(); when(mockXcodeProjectInterpreter.getBuildSettings(any, any)).thenReturn({ - 'SWIFT_VERSION': '3.0', + 'SWIFT_VERSION': '4.0', }); addAndroidGradleFile(project.directory, gradleFileContent: () {