Skip to content

fix(flutter): Use static SwiftPM binaries - #4118

Merged
philprime merged 3 commits into
mainfrom
fix/swiftpm-static-binaries
Oct 28, 2026
Merged

philprime merged 3 commits into
mainfrom
fix/swiftpm-static-binaries

Conversation

@philprime

@philprime philprime commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Description

Use the Sentry-Static product from sentry-apple-binaries for SwiftPM builds, avoiding the unused dynamic and platform variants in the full Cocoa package. The pinned Cocoa version remains 9.31.0, with the same static framework URL, checksum, and C++ helper.

Update version parsing and replacement for the mirror URL, and align the example app's SwiftPM lockfiles with the mirror. Release discovery remains on sentry-cocoa, where GitHub releases are published.

Motivation and Context

Fixes #4117.

SwiftPM downloads binary targets beyond the selected product. The mirror contains two static binary targets instead of the full package's seven, reducing clean-build downloads and exposure to download failures.

How did you test it?

  • Ran a temporary regression harness against SwiftPM's parsed manifest, which failed before the fix and passed afterward.
  • Checked stable and prerelease version updates on an isolated copy, including restoring the original manifest byte-for-byte.
  • Ran shell syntax validation and git diff --check.

CI passes iOS/macOS native and integration tests, iOS/Android size-analysis builds, and minimum-version builds.

Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec
  • No breaking changes

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟒 Patch (bug fixes)

πŸ“‹ Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Fixes

  • (flutter) Use static SwiftPM binaries by philprime and lucas-zimerman in #4118

Internal Changes

  • (flutter) Use Cocoa internal serializer by philprime, buenaflor and christophaigner in #4100
  • Use dark-mode-aware Sentry logo in READMEs by szokeasaurusrex with sentry-junior in #4123

πŸ€– This preview updates automatically when you update the PR.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 92.94%. Comparing base (c24fec9) to head (20fde5b).
βœ… All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4118      +/-   ##
==========================================
+ Coverage   88.78%   92.94%   +4.15%     
==========================================
  Files         348      114     -234     
  Lines       12631     4636    -7995     
==========================================
- Hits        11215     4309    -6906     
+ Misses       1416      327    -1089     
Flag Coverage Ξ”
sentry ?
sentry_dio ?
sentry_drift ?
sentry_file ?
sentry_firebase_remote_config 100.00% <ΓΈ> (ΓΈ)
sentry_flutter 92.66% <ΓΈ> (ΓΈ)
sentry_grpc ?
sentry_hive ?
sentry_isar ?
sentry_link ?
sentry_logging ?
sentry_sqflite ?
sentry_supabase 97.48% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

@philprime
philprime marked this pull request as ready for review October 26, 2026 20:05
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Q: This change also applies to Sentry React Native, Capacitor and other platforms?

@lucas-zimerman

Copy link
Copy Markdown
Collaborator

after a quick check, capacitor also suffers from this issue, will replicate the PR there later

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@philprime
philprime merged commit 5aa63c9 into main Oct 28, 2026
71 checks passed
@philprime
philprime deleted the fix/swiftpm-static-binaries branch October 28, 2026 23:55
lucas-zimerman added a commit to getsentry/sentry-capacitor that referenced this pull request Oct 29, 2026
* fix(ios): Use static SwiftPM binaries

Use the Sentry-Static product from sentry-apple-binaries for SwiftPM
builds, avoiding downloads of the unused dynamic and platform variants
in the full sentry-cocoa package. The pinned Cocoa version stays 9.28.0.

Update the version regex in update-cocoa.sh for the mirror URL and align
the example apps' Package.resolved files. Release discovery remains on
sentry-cocoa, where GitHub releases are published.

Port of getsentry/sentry-dart#4118.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: Link changelog entry to PR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
philprime added a commit to getsentry/sentry-cocoa that referenced this pull request Oct 30, 2026
sentry-dart now depends on the Sentry-Static product of
sentry-apple-binaries instead of the Sentry product of sentry-cocoa
(getsentry/sentry-dart#4118), so the Package.swift replacement no
longer matched. Map both packages and the product to the local
checkout and fail if any remote reference remains.

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Phil Niedertscheider <30923007+philprime@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SwiftPM: sentry_flutter downloads all 7 Sentry xcframeworks (3.2 GB) but uses only 1

2 participants