Skip to content

Commit 16819d5

Browse files
migrate to UIScene (#417)
1 parent 3e1cd51 commit 16819d5

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

ios/Runner/AppDelegate.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import UIKit
21
import Flutter
2+
import UIKit
33

44
@main
5-
@objc class AppDelegate: FlutterAppDelegate {
5+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
66
override func application(
77
_ application: UIApplication,
88
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
99
) -> Bool {
10-
GeneratedPluginRegistrant.register(with: self)
1110
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
1211
}
12+
13+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
14+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
15+
}
1316
}

ios/Runner/Info.plist

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<string>Location permission is required to view your position.</string>
99
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
1010
<string>Location permission is required to view your position.</string>
11+
<key>CADisableMinimumFrameDurationOnPhone</key>
12+
<true/>
1113
<key>CFBundleDevelopmentRegion</key>
1214
<string>$(DEVELOPMENT_LANGUAGE)</string>
1315
<key>CFBundleDisplayName</key>
@@ -30,6 +32,29 @@
3032
<string>$(FLUTTER_BUILD_NUMBER)</string>
3133
<key>LSRequiresIPhoneOS</key>
3234
<true/>
35+
<key>UIApplicationSceneManifest</key>
36+
<dict>
37+
<key>UIApplicationSupportsMultipleScenes</key>
38+
<false/>
39+
<key>UISceneConfigurations</key>
40+
<dict>
41+
<key>UIWindowSceneSessionRoleApplication</key>
42+
<array>
43+
<dict>
44+
<key>UISceneClassName</key>
45+
<string>UIWindowScene</string>
46+
<key>UISceneConfigurationName</key>
47+
<string>flutter</string>
48+
<key>UISceneDelegateClassName</key>
49+
<string>FlutterSceneDelegate</string>
50+
<key>UISceneStoryboardFile</key>
51+
<string>Main</string>
52+
</dict>
53+
</array>
54+
</dict>
55+
</dict>
56+
<key>UIApplicationSupportsIndirectInputEvents</key>
57+
<true/>
3358
<key>UILaunchStoryboardName</key>
3459
<string>LaunchScreen</string>
3560
<key>UIMainStoryboardFile</key>
@@ -47,9 +72,5 @@
4772
<string>UIInterfaceOrientationLandscapeLeft</string>
4873
<string>UIInterfaceOrientationLandscapeRight</string>
4974
</array>
50-
<key>CADisableMinimumFrameDurationOnPhone</key>
51-
<true/>
52-
<key>UIApplicationSupportsIndirectInputEvents</key>
53-
<true/>
5475
</dict>
5576
</plist>

0 commit comments

Comments
 (0)