From e03c672b829294bcc6222696ef5b585df54088a0 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Tue, 14 Jan 2020 06:14:13 +1000 Subject: [PATCH] Update platform_view_swift (#234) --- platform_view_swift/ios/.gitignore | 32 +++++++++++++++++++ .../ios/Runner/AppDelegate.swift | 20 ++++++------ .../ios/Runner/Base.lproj/Main.storyboard | 14 +++----- .../ios/Runner/Runner-Bridging-Header.h | 2 +- 4 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 platform_view_swift/ios/.gitignore diff --git a/platform_view_swift/ios/.gitignore b/platform_view_swift/ios/.gitignore new file mode 100644 index 000000000..e96ef602b --- /dev/null +++ b/platform_view_swift/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/platform_view_swift/ios/Runner/AppDelegate.swift b/platform_view_swift/ios/Runner/AppDelegate.swift index e4cf4b61b..630e34447 100644 --- a/platform_view_swift/ios/Runner/AppDelegate.swift +++ b/platform_view_swift/ios/Runner/AppDelegate.swift @@ -6,14 +6,14 @@ import UIKit import Flutter @UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate, PlatformViewControllerDelegate -{ - var flutterResult: FlutterResult? - - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - GeneratedPluginRegistrant.register(with: self) +@objc class AppDelegate: FlutterAppDelegate, PlatformViewControllerDelegate { + var flutterResult: FlutterResult? + + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) let controller: FlutterViewController = window?.rootViewController as! FlutterViewController let channel = FlutterMethodChannel.init(name: "dev.flutter.sample/platform_view_swift", binaryMessenger: controller.binaryMessenger) @@ -34,8 +34,8 @@ import Flutter } }); - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } func didUpdateCounter(counter: Int) { flutterResult?(counter) diff --git a/platform_view_swift/ios/Runner/Base.lproj/Main.storyboard b/platform_view_swift/ios/Runner/Base.lproj/Main.storyboard index 3e2b56dae..f3c28516f 100644 --- a/platform_view_swift/ios/Runner/Base.lproj/Main.storyboard +++ b/platform_view_swift/ios/Runner/Base.lproj/Main.storyboard @@ -1,12 +1,8 @@ - - - - - + + - - + @@ -18,9 +14,9 @@ - + - + diff --git a/platform_view_swift/ios/Runner/Runner-Bridging-Header.h b/platform_view_swift/ios/Runner/Runner-Bridging-Header.h index 7335fdf90..308a2a560 100644 --- a/platform_view_swift/ios/Runner/Runner-Bridging-Header.h +++ b/platform_view_swift/ios/Runner/Runner-Bridging-Header.h @@ -1 +1 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file +#import "GeneratedPluginRegistrant.h"