fix(ios): remove duplicate Sentry.xcframework signature to unblock Xcode 26 archive - #109
Conversation
…ode 26 archive FronteggSwift transitively links sentry-cocoa, so under `use_frameworks!` Sentry.xcframework's signature is collected twice (app product + FronteggRN pod) and Xcode 26's archive signature-collection step fails with "an item with the same name already exists". Add a pod-target script phase that removes this pod's duplicate copy after it builds, before the app archive collects signatures. The app-level copy is untouched, so Sentry stays signed; the phase is a harmless no-op when Sentry isn't present or on pre-Xcode-26 toolchains. Mirrors maplibre-react-native#1490. Closes frontegg#108.
dianaKhortiuk-frontegg
left a comment
There was a problem hiding this comment.
Approving — the mechanism checks out and both E2E checks are green.
The script_phase removes only the pod's duplicate Sentry.xcframework-ios.signature after compile, leaving the app-level copy signed, and it's a no-op when Sentry isn't linked or on pre-Xcode-26 toolchains. Mirrors maplibre-react-native#1490.
One caveat recorded for follow-up rather than blocking: our CI cannot actually verify this fix. The iOS E2E workflow runs build-for-testing, not archive (react-native-sdk-e2e.yml:189), and this fixes an archive failure — so the green checks don't exercise the code path in question. Merging on the strength of your local verification on 26.1.1 / 26.3 plus the low blast radius (worst case the rm -rf is a no-op). I'll file a separate ticket to add an archive step to CI so this is covered going forward.
Thanks for the clear write-up on #108 — the duplicate-signature diagnosis made this easy to follow.
Summary
Archiving an app that integrates
@frontegg/react-nativewithuse_frameworks!under Xcode 26 fails deterministically:Fixes #108.
Root cause
FronteggSwifttransitively linkssentry-cocoa. Withuse_frameworks!,Sentry.xcframeworkends up embedded/signed in two places, so Xcode 26's new xcframework signature-collection step tries to copy two files of the same name into the sharedSignatures/dir:This is the same multi-target xcframework-signature issue MapLibre RN hit — see maplibre-react-native#1489 / maplibre-react-native#1490.
Fix
Add a pod-target
script_phasetoFronteggRN.podspecthat removes this pod's duplicate copy after it builds, before the app archive collects signatures:post_install) means it applies automatically on both the modernspm_dependencypath and thefrontegg_spm.rbfallback — no Podfile changes for consumers.Verification
The signature-removal itself is verified: applying the identical
rm -rf "$CONFIGURATION_BUILD_DIR/Sentry.xcframework-ios.signature"on the app targets (viapost_install) takes the archive from the error above to** ARCHIVE SUCCEEDED **on Xcode 26.1.1 and 26.3, in a large multi-target (white-label) RN workspace withuse_frameworks!.This PR moves that same removal into the podspec on the FronteggRN pod target. The collision is a name clash between two identical-named signature files, so removing either copy resolves it; I've confirmed the app-level removal by archive and reasoned the pod-level removal is symmetric (the pod emits its copy before the app's collection step). It would be great to confirm on the example app in CI — happy to iterate on placement (
:after_compilevs:before_compile) if your CI shows a timing preference.Environment
@frontegg/react-native1.2.20 · FronteggSwift 1.3.13 (SPM) · sentry-cocoa 8.58.4 ·use_frameworks!· CocoaPods 1.16.2 · Xcode 26.1.1 / 26.3 · React Native, multi-target workspace.