Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,7 @@ ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTex
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputSemanticsObjectTest.mm + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextureRegistrar.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextureRegistrar.mm + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterUmbrellaImportTests.m + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.mm + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm + ../../../flutter/LICENSE
Expand Down Expand Up @@ -5276,6 +5277,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextu
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextureRegistrar.mm
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.h
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterUmbrellaImportTests.m
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.mm
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm
Expand Down
4 changes: 4 additions & 0 deletions common/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ if (is_ios || is_mac) {
"-Werror=overriding-method-mismatch",
"-Werror=undeclared-selector",
]
if (is_mac) {
flutter_cflags_objc += [ "-fapplication-extension" ]
}

flutter_cflags_objcc = flutter_cflags_objc
flutter_cflags_objc_arc = flutter_cflags_objc + [ "-fobjc-arc" ]
flutter_cflags_objcc_arc = flutter_cflags_objc_arc
Expand Down
25 changes: 23 additions & 2 deletions shell/platform/darwin/macos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ shared_library("flutter_framework_dylib") {
visibility = [ ":*" ]
output_name = "$_flutter_framework_name"

ldflags = [ "-Wl,-install_name,@rpath/$_flutter_framework_filename/$_framework_binary_subpath" ]
ldflags = [
"-Wl,-install_name,@rpath/$_flutter_framework_filename/$_framework_binary_subpath",
"-fapplication-extension",
]

deps = [ ":flutter_framework_source" ]
}
Expand Down Expand Up @@ -297,7 +300,7 @@ action("_generate_symlinks") {
}

group("flutter_framework") {
deps = [ ":_generate_symlinks" ]
deps = [ ":_generate_symlinks_and_verify_framework_module" ]
}

if (build_glfw_shell) {
Expand Down Expand Up @@ -334,3 +337,21 @@ generated_file("macos_framework_without_entitlement_config") {

deps = [ ":_generate_symlinks" ]
}

shared_library("_generate_symlinks_and_verify_framework_module") {
framework_search_path = rebase_path("$root_out_dir")
visibility = [ ":*" ]
cflags_objc = [ "-F$framework_search_path" ]

ldflags = [
"-F$framework_search_path",
"-fapplication-extension",
"-Xlinker",
"-fatal_warnings",
]
frameworks = [ "FlutterMacOS.framework" ]

sources = [ "framework/Source/FlutterUmbrellaImportTests.m" ]

deps = [ ":_generate_symlinks" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// FLUTTER_NOLINT: https://github.com/flutter/flutter/issues/93360

// The only point of this file is to ensure that the Flutter framework umbrella header can be
// cleanly imported from an Objective-C translation unit. The target that uses this file copies the
// headers to a path that simulates how users would actually import the framework outside of the
// engine source root.
#import <FlutterMacOS/FlutterMacOS.h>