Skip to content

SwiftPM downloads all xcframework variants #9146

Closed as duplicate
Closed as duplicate

Description

@alwx

Package.swift declares one binary target for each distribution variant. SwiftPM downloads all artifacts of a resolved package, not only the artifacts that the selected product needs.

A consumer that uses the Sentry product only gets all seven archives. From a clean build of a small app:

2.9G  artifacts/sentry-cocoa            <- total
339M  Sentry                            <- the only variant in use
580M  Sentry-Dynamic
640M  Sentry-Dynamic-WithARM64e
468M  Sentry-WithoutUIKitOrAppKit
517M  Sentry-WithoutUIKitOrAppKit-WithARM64e
299M  SentryObjC-Dynamic
150M  SentryObjC-Static

This makes a cold build slow. It also gives seven chances for a download to fail. Our CI build failed today because GitHub answered with status 500 for SentryObjC-Dynamic.xcframework.zip, which that build does not use.

Please let a consumer get only the variant that it uses. Possible options: put each variant in its own package, or keep only Sentry in the default manifest.

For now sentry-react-native declares the Sentry.xcframework archive as its own binary target and does not depend on this package (see getsentry/sentry-react-native#6784).

Activity

  1. linear-code commented on Sep 24, 2026

    @linear-code
  2. philprime commented on Sep 28, 2026

    @philprime
    Member

    Closing this as a duplicate of #8133, let's continue the discussion there.

  3. added a commit that references this issue on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions