Skip to content

Commit 3a992cb

Browse files
authored
fix: update Flutter deprecated list APIs (#1174)
* fix: update Flutter deprecated list APIs * chore: update Flutter 3.44 package integrations * chore: use forked editor dependencies * fix: update UTF-8 decoder parameter * fix: flutter 3.44.1 * fix: action * fix: migrate iCloud storage and iOS lifecycle * fix
1 parent 60319db commit 3a992cb

33 files changed

Lines changed: 511 additions & 318 deletions

File tree

.github/workflows/analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: subosito/flutter-action@v2
2525
with:
2626
channel: 'stable'
27-
flutter-version: '3.41.9'
27+
# flutter-version: '3.44.1'
2828

2929
- name: Install dependencies
3030
run: flutter pub get

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: subosito/flutter-action@v2
2828
with:
2929
channel: "stable"
30-
flutter-version: "3.41.9"
30+
flutter-version: "3.44.1"
3131
- uses: actions/setup-java@v4
3232
with:
3333
distribution: "zulu"

ios/Podfile.lock

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,15 @@
11
PODS:
2-
- camera_avfoundation (0.0.1):
3-
- Flutter
4-
- file_picker (0.0.1):
5-
- Flutter
62
- Flutter (1.0.0)
7-
- flutter_native_splash (2.4.3):
8-
- Flutter
9-
- flutter_secure_storage_darwin (10.0.0):
10-
- Flutter
11-
- FlutterMacOS
12-
- icloud_storage (0.0.1):
13-
- Flutter
14-
- local_auth_darwin (0.0.1):
15-
- Flutter
16-
- FlutterMacOS
17-
- package_info_plus (0.4.5):
18-
- Flutter
19-
- plain_notification_token (0.0.1):
20-
- Flutter
21-
- share_plus (0.0.1):
22-
- Flutter
23-
- shared_preferences_foundation (0.0.1):
24-
- Flutter
25-
- FlutterMacOS
26-
- url_launcher_ios (0.0.1):
27-
- Flutter
28-
- wakelock_plus (0.0.1):
29-
- Flutter
30-
- watch_connectivity (0.0.1):
31-
- Flutter
323

334
DEPENDENCIES:
34-
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
35-
- file_picker (from `.symlinks/plugins/file_picker/ios`)
365
- Flutter (from `Flutter`)
37-
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
38-
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
39-
- icloud_storage (from `.symlinks/plugins/icloud_storage/ios`)
40-
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
41-
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
42-
- plain_notification_token (from `.symlinks/plugins/plain_notification_token/ios`)
43-
- share_plus (from `.symlinks/plugins/share_plus/ios`)
44-
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
45-
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
46-
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
47-
- watch_connectivity (from `.symlinks/plugins/watch_connectivity/ios`)
486

497
EXTERNAL SOURCES:
50-
camera_avfoundation:
51-
:path: ".symlinks/plugins/camera_avfoundation/ios"
52-
file_picker:
53-
:path: ".symlinks/plugins/file_picker/ios"
548
Flutter:
559
:path: Flutter
56-
flutter_native_splash:
57-
:path: ".symlinks/plugins/flutter_native_splash/ios"
58-
flutter_secure_storage_darwin:
59-
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
60-
icloud_storage:
61-
:path: ".symlinks/plugins/icloud_storage/ios"
62-
local_auth_darwin:
63-
:path: ".symlinks/plugins/local_auth_darwin/darwin"
64-
package_info_plus:
65-
:path: ".symlinks/plugins/package_info_plus/ios"
66-
plain_notification_token:
67-
:path: ".symlinks/plugins/plain_notification_token/ios"
68-
share_plus:
69-
:path: ".symlinks/plugins/share_plus/ios"
70-
shared_preferences_foundation:
71-
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
72-
url_launcher_ios:
73-
:path: ".symlinks/plugins/url_launcher_ios/ios"
74-
wakelock_plus:
75-
:path: ".symlinks/plugins/wakelock_plus/ios"
76-
watch_connectivity:
77-
:path: ".symlinks/plugins/watch_connectivity/ios"
7810

7911
SPEC CHECKSUMS:
80-
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
81-
file_picker: fb04e739ae6239a76ce1f571863a196a922c87d4
8212
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
83-
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
84-
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23
85-
icloud_storage: e55639f0c0d7cb2b0ba9c0b3d5968ccca9cd9aa2
86-
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
87-
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
88-
plain_notification_token: 047876b9d80a5b93565ddcc13a487a7e7b906f7d
89-
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
90-
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
91-
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
92-
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
93-
watch_connectivity: 88e5bea25b473e66ef8d3f960954d154ed0356d6
9413

9514
PODFILE CHECKSUM: 5a0fb6438066e44ab2c77bd223668d351b8d8461
9615

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 98 additions & 91 deletions
Large diffs are not rendered by default.

ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"

ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/Runner/AppDelegate.swift

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,34 @@ import Flutter
44
import ActivityKit
55

66
@main
7-
@objc class AppDelegate: FlutterAppDelegate {
7+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
88
override func application(
99
_ application: UIApplication,
1010
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
1111
) -> Bool {
12-
GeneratedPluginRegistrant.register(with: self)
13-
14-
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
15-
// Home widget channel (legacy)
16-
let homeWidgetChannel = FlutterMethodChannel(name: "tech.lolli.toolbox/home_widget", binaryMessenger: controller.binaryMessenger)
12+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
13+
}
14+
15+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
16+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
17+
setupMethodChannels(binaryMessenger: engineBridge.applicationRegistrar.messenger())
18+
}
19+
20+
private func setupMethodChannels(binaryMessenger: FlutterBinaryMessenger) {
21+
let homeWidgetChannel = FlutterMethodChannel(name: "tech.lolli.toolbox/home_widget", binaryMessenger: binaryMessenger)
1722
homeWidgetChannel.setMethodCallHandler({(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
18-
if call.method == "update" {
23+
switch call.method {
24+
case "update":
1925
if #available(iOS 14.0, *) {
2026
WidgetCenter.shared.reloadTimelines(ofKind: "StatusWidget")
2127
}
28+
result(nil)
29+
default:
30+
result(FlutterMethodNotImplemented)
2231
}
2332
})
2433

25-
// Main channel for cross-platform calls (incl. Live Activities)
26-
let mainChannel = FlutterMethodChannel(name: "tech.lolli.toolbox/main_chan", binaryMessenger: controller.binaryMessenger)
34+
let mainChannel = FlutterMethodChannel(name: "tech.lolli.toolbox/main_chan", binaryMessenger: binaryMessenger)
2735
mainChannel.setMethodCallHandler({(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
2836
switch call.method {
2937
case "updateHomeWidget":
@@ -54,7 +62,6 @@ import ActivityKit
5462
result(FlutterMethodNotImplemented)
5563
}
5664
})
57-
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
5865
}
5966

6067
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

ios/Runner/Info-Debug.plist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@
4545
<true/>
4646
<key>UIApplicationSupportsIndirectInputEvents</key>
4747
<true />
48+
<key>UIApplicationSceneManifest</key>
49+
<dict>
50+
<key>UIApplicationSupportsMultipleScenes</key>
51+
<false />
52+
<key>UISceneConfigurations</key>
53+
<dict>
54+
<key>UIWindowSceneSessionRoleApplication</key>
55+
<array>
56+
<dict>
57+
<key>UISceneClassName</key>
58+
<string>UIWindowScene</string>
59+
<key>UISceneDelegateClassName</key>
60+
<string>FlutterSceneDelegate</string>
61+
<key>UISceneConfigurationName</key>
62+
<string>flutter</string>
63+
<key>UISceneStoryboardFile</key>
64+
<string>Main</string>
65+
</dict>
66+
</array>
67+
</dict>
68+
</dict>
4869
<key>UIBackgroundModes</key>
4970
<array>
5071
<string>fetch</string>

ios/Runner/Info-Profile.plist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@
3737
<true/>
3838
<key>UIApplicationSupportsIndirectInputEvents</key>
3939
<true/>
40+
<key>UIApplicationSceneManifest</key>
41+
<dict>
42+
<key>UIApplicationSupportsMultipleScenes</key>
43+
<false/>
44+
<key>UISceneConfigurations</key>
45+
<dict>
46+
<key>UIWindowSceneSessionRoleApplication</key>
47+
<array>
48+
<dict>
49+
<key>UISceneClassName</key>
50+
<string>UIWindowScene</string>
51+
<key>UISceneDelegateClassName</key>
52+
<string>FlutterSceneDelegate</string>
53+
<key>UISceneConfigurationName</key>
54+
<string>flutter</string>
55+
<key>UISceneStoryboardFile</key>
56+
<string>Main</string>
57+
</dict>
58+
</array>
59+
</dict>
60+
</dict>
4061
<key>UIBackgroundModes</key>
4162
<array>
4263
<string>fetch</string>

0 commit comments

Comments
 (0)