Skip to content

Conversation

@cbracken
Copy link
Member

This adds Obj-C/Swift bridging headers to Swift targets, which allows us
to use public Flutter framework API from Swift code in the framework.

This also restricts visibility of the Swift framework targets to the
corresponding framework target. The addition of a bridging header allows
us to use public framework types declared in those headers from Swift,
but those types are defined in the framework target, and thus using the
Swift target directly may result in linking errors in the user. Instead,
all usage of the Swift target should be transitive via the framework
target.

Issue: #144791

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

This adds Obj-C/Swift bridging headers to Swift targets, which allows us
to use public Flutter framework API from Swift code in the framework.

This also restricts visibility of the Swift framework targets to the
corresponding framework target. The addition of a bridging header allows
us to use public framework types declared in those headers from Swift,
but those types are defined in the framework target, and thus using the
Swift target directly may result in linking errors in the user. Instead,
all usage of the Swift target should be transitive via the framework
target.

Issue: flutter#144791
@cbracken cbracken requested a review from a team as a code owner May 15, 2025 18:25
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. a: desktop Running on desktop team-ios Owned by iOS platform team platform-macos labels May 15, 2025
@cbracken cbracken requested a review from matanlurey May 15, 2025 18:25
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label May 15, 2025
@auto-submit auto-submit bot added this pull request to the merge queue May 15, 2025
Merged via the queue into flutter:master with commit 5cf4a50 May 15, 2025
178 of 179 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 15, 2025
@cbracken cbracken deleted the swift-bridging-headers branch May 15, 2025 23:02
@stuartmorgan-g
Copy link
Contributor

test-exempt: configuration change

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically platform-macos team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants