Skip to content

Commit ba31b50

Browse files
committed
feat(ios): 迁移ios,采用 UISceneDelegate
1 parent 3003da0 commit ba31b50

3 files changed

Lines changed: 35 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import <Flutter/Flutter.h>
22
#import <UIKit/UIKit.h>
33

4-
@interface AppDelegate : FlutterAppDelegate
4+
@interface AppDelegate : FlutterAppDelegate <FlutterImplicitEngineDelegate>
55

66
@end

tdesign-component/example/ios/Runner/AppDelegate.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ @implementation AppDelegate
55

66
- (BOOL)application:(UIApplication *)application
77
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8-
[GeneratedPluginRegistrant registerWithRegistry:self];
98
// Override point for customization after application launch.
109
return [super application:application didFinishLaunchingWithOptions:launchOptions];
1110
}
1211

12+
- (void)didInitializeImplicitFlutterEngine:(NSObject<FlutterImplicitEngineBridge>*)engineBridge {
13+
[GeneratedPluginRegistrant registerWithRegistry:engineBridge.pluginRegistry];
14+
}
15+
1316
@end

tdesign-component/example/ios/Runner/Info.plist

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleDisplayName</key>
@@ -18,17 +20,40 @@
1820
<string>APPL</string>
1921
<key>CFBundleShortVersionString</key>
2022
<string>$(FLUTTER_BUILD_NAME)</string>
23+
<key>CFBundleSignature</key>
24+
<string>????</string>
25+
<key>CFBundleVersion</key>
26+
<string>$(FLUTTER_BUILD_NUMBER)</string>
27+
<key>LSRequiresIPhoneOS</key>
28+
<true/>
2129
<key>NSCameraUsageDescription</key>
2230
<string>UploadComponentNeeded</string>
2331
<key>NSMicrophoneUsageDescription</key>
2432
<string>UploadComponentNeeded</string>
2533
<key>NSPhotoLibraryUsageDescription</key>
2634
<string>UploadComponentNeeded</string>
27-
<key>CFBundleSignature</key>
28-
<string>????</string>
29-
<key>CFBundleVersion</key>
30-
<string>$(FLUTTER_BUILD_NUMBER)</string>
31-
<key>LSRequiresIPhoneOS</key>
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>
3257
<true/>
3358
<key>UILaunchStoryboardName</key>
3459
<string>LaunchScreen</string>
@@ -49,9 +74,5 @@
4974
</array>
5075
<key>UIViewControllerBasedStatusBarAppearance</key>
5176
<true/>
52-
<key>CADisableMinimumFrameDurationOnPhone</key>
53-
<true/>
54-
<key>UIApplicationSupportsIndirectInputEvents</key>
55-
<true/>
5677
</dict>
5778
</plist>

0 commit comments

Comments
 (0)