Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1592b60

Browse files
authored
[macOS] Remove FlutterApplication class (#40939)
The need for the FlutterApplication NSApplication subclass was eliminated in 8679b67. The relevant app termination logic was moved into FlutterAppDelegate in that patch. Removing FlutterApplication needs to be done in three stages: 1. Migrate logic to FlutterAppDelegate (done in above patch) 2. Update Flutter tool template. Update migrator to migrate all apps using FlutterApplication back to NSApplication. This is done in flutter/flutter#124173. 3. Eliminate FlutterApplication.h header since all references to it have now been removed. No tests since, as described above, this is the removal of unused (as of step 2 above) code. Issue: flutter/flutter#30735 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent 3f6a278 commit 1592b60

File tree

5 files changed

+0
-62
lines changed

5 files changed

+0
-62
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2603,7 +2603,6 @@ ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.mm + ../../
26032603
ORIGIN: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.h + ../../../flutter/LICENSE
26042604
ORIGIN: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.mm + ../../../flutter/LICENSE
26052605
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h + ../../../flutter/LICENSE
2606-
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterApplication.h + ../../../flutter/LICENSE
26072606
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterDartProject.h + ../../../flutter/LICENSE
26082607
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h + ../../../flutter/LICENSE
26092608
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterMacOS.h + ../../../flutter/LICENSE
@@ -2616,7 +2615,6 @@ ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/Accessibil
26162615
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm + ../../../flutter/LICENSE
26172616
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDelegate.mm + ../../../flutter/LICENSE
26182617
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDelegate_Internal.h + ../../../flutter/LICENSE
2619-
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterApplication.mm + ../../../flutter/LICENSE
26202618
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h + ../../../flutter/LICENSE
26212619
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm + ../../../flutter/LICENSE
26222620
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.h + ../../../flutter/LICENSE
@@ -5196,7 +5194,6 @@ FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.mm
51965194
FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.h
51975195
FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.mm
51985196
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h
5199-
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterApplication.h
52005197
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterDartProject.h
52015198
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h
52025199
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterMacOS.h
@@ -5210,7 +5207,6 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/Accessibilit
52105207
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm
52115208
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDelegate.mm
52125209
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDelegate_Internal.h
5213-
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterApplication.mm
52145210
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h
52155211
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm
52165212
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.h

shell/platform/darwin/macos/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ _framework_binary_subpath = "Versions/A/$_flutter_framework_name"
3838
# the Flutter engine source root.
3939
_flutter_framework_headers = [
4040
"framework/Headers/FlutterAppDelegate.h",
41-
"framework/Headers/FlutterApplication.h",
4241
"framework/Headers/FlutterDartProject.h",
4342
"framework/Headers/FlutterEngine.h",
4443
"framework/Headers/FlutterMacOS.h",
@@ -58,7 +57,6 @@ source_set("flutter_framework_source") {
5857
"framework/Source/AccessibilityBridgeMac.h",
5958
"framework/Source/AccessibilityBridgeMac.mm",
6059
"framework/Source/FlutterAppDelegate.mm",
61-
"framework/Source/FlutterApplication.mm",
6260
"framework/Source/FlutterBackingStore.h",
6361
"framework/Source/FlutterBackingStore.mm",
6462
"framework/Source/FlutterChannelKeyResponder.h",

shell/platform/darwin/macos/framework/Headers/FlutterApplication.h

Lines changed: 0 additions & 47 deletions
This file was deleted.

shell/platform/darwin/macos/framework/Headers/FlutterMacOS.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
#import "FlutterAppDelegate.h"
6-
#import "FlutterApplication.h"
76
#import "FlutterBinaryMessenger.h"
87
#import "FlutterChannels.h"
98
#import "FlutterCodecs.h"

shell/platform/darwin/macos/framework/Source/FlutterApplication.mm

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)