Skip to content

Document the SPM migration playbook for end users #6174

Open

Description

@alwx

Once RNSentry publishes a Package.swift and the React Native ecosystem supports SPM autolinking, end users will need clear guidance on:

  • Whether to use CocoaPods or SPM for a given app.
  • How to migrate an existing CocoaPods-based app to SPM.
  • What the support matrix looks like (which RN versions support each path).
  • What to do with Expo apps, brownfield iOS apps, and edge cases.

Without explicit guidance, users will hit the transition in an ad hoc way and surface confused support tickets to us.

Activity

  1. linear-code commented on May 18, 2026

    @linear-code
  2. ismumchow commented on Jun 17, 2026

    @ismumchow

    Hitting Sentry.xcframework-ios.signature couldn't be copied to Signatures?

    This bites archive builds (CI / TestFlight / Firebase distribution) but not xcodebuild build or Xcode → Run, because only
    archive packaging consolidates signatures into <App>.app/Signatures/. If it works on a device locally but breaks in CI, you're
    hitting this.

    Why: With SENTRY_USE_SPM=1, RN's cocoapods/spm.rb adds Sentry as an SPM product dep on the RNSentry pod target in
    addition to your app target's transitive consumption. Xcode collects Sentry.xcframework-ios.signature once per target → two files,
    same destination, collision.

    Workaround (drop into your Podfile post_install):

    rnsentry = installer.pods_project.targets.find { |t| t.name == 'RNSentry' }
    if rnsentry
      phase_name = 'Strip duplicate Sentry.xcframework signature'
      unless rnsentry.shell_script_build_phases.any? { |p| p.name == phase_name }
        phase = rnsentry.new_shell_script_build_phase(phase_name)
        phase.shell_script = "rm -f \"$BUILT_PRODUCTS_DIR/Sentry.xcframework-ios.signature\" || true\n"
      end
    end
    
    The app target's canonical signature still lands in the archive. RNSentry compiles normally, Sentry stays statically linked.
    
    Caveats:
    - Workaround, not a fix — track getsentry/sentry-react-native#6174 for the official RN-SPM playbook and remove this once it ships.
    - Verified on Xcode 26.3 / @sentry/react-native 8.13 / RN 0.80. Worth re-checking on any of those bumps.
    - Fails loud, not silent: if it ever stops applying, you get the same original error back.
  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 17, 2026
  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jul 7, 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

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions