[🐛] [iOS][SPM] Archive signature-collision workaround misses the `-ios-simulator` slice

Aperta Adatta ai principianti
#9,414 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
ios, ruby

Direzione di ricerca

Inizia da packages/app/firebase_spm.rb, in particolare da rnfirebase_fix_spm_archive_signature_collision alle righe 1325–1353 e dall’avviso di fallback alle righe 809–814. Controlla come lo script gestisce i file di firma di iOS e del simulatore iOS, quindi esegui il comando di archiviazione fornito ./repro.sh per confermare il fallimento e verificare che l’archiviazione riesca dopo la modifica.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs Attention type: bug

Issue

rnfirebase_fix_spm_archive_signature_collision (firebase_spm.rb L1325–1353) adds a Run Script phase that only removes <name>.xcframework-ios.signature (L1336–1338). An archive for a simulator destination stages <name>.xcframework-ios-simulator.signature instead, so the phase removes nothing and Archive fails:

xcodebuild: error: “GoogleAdsOnDeviceConversion.xcframework-ios-simulator.signature” couldn’t be copied to “Signatures” because an item with the same name already exists.

This is what Bitrise's xcode-build-for-simulator step does by default: it always runs archive with -destination "generic/platform=iOS Simulator".

Repro: https://github.com/opfeffer/rnfb-sandbox/tree/07134d103d52485792d198d03573d2a9a4eeac7d. Run ./repro.sh (Expo SDK 57 blank TS, CNG, RNFB app + analytics 27.1.0, useFrameworks: "dynamic"):

  1. xcodebuild archive … -destination "generic/platform=iOS Simulator" → fails with the error above
  2. Same command with build → passes (only archive stages the signatures)
  3. Same archive with the patch below → passes

Suggested fix:

-      rm_lines = RNFIREBASE_SPM_SIGNATURE_FIX_ARTIFACT_NAMES.map do |name|
-        "rm -f \"${CONFIGURATION_BUILD_DIR}\"/#{name}.xcframework-ios.signature"
+      rm_lines = RNFIREBASE_SPM_SIGNATURE_FIX_ARTIFACT_NAMES.flat_map do |name|
+        %w[ios ios-simulator].map { |slice| "rm -f \"${CONFIGURATION_BUILD_DIR}\"/#{name}.xcframework-#{slice}.signature" }
       end

The fallback warning (L809–814) also only mentions -ios.signature.


Project Files

Javascript
Click To Expand

package.json:
{
  "dependencies": {
    "@react-native-firebase/analytics": "27.1.0",
    "@react-native-firebase/app": "27.1.0",
    "expo": "57.0.31",
    "expo-build-properties": "57.0.22",
    "expo-status-bar": "57.0.1",
    "react": "19.2.3",
    "react-native": "0.86.3"
  },
  "devDependencies": {
    "@types/react": "19.2.18",
    "patch-package": "8.0.1",
    "typescript": "6.0.3"
  }
}
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand

ios/Podfile:
  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# Unmodified Podfile from `expo prebuild` (Expo SDK 57, CNG), with
# expo-build-properties `ios.useFrameworks: "dynamic"`. See the repro repo.
AppDelegate.m:
// N/A: unmodified Expo-generated AppDelegate.swift


Android
Click To Expand

Have you converted to AndroidX?
  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
  OS: macOS 26.7.1
  CPU: (14) arm64 Apple M4 Pro
Binaries:
  Node: 24.22.1
  npm: 11.19.1
Managers:
  CocoaPods: 1.16.2
SDKs:
  iOS SDK: iOS 26.5
IDEs:
  Xcode: 26.6/17F113
Languages:
  Ruby: 3.3.10
npmPackages:
  react: 19.2.3
  react-native: 0.86.3
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 27.1.0
  • Firebase module(s) you're using that has the issue:
    • app (firebase_spm.rb), triggered by analytics (firebase-ios-sdk 13.1.1 via SPM)
  • Are you using TypeScript?
    • Y & 6.0.3

Lingua principale
TypeScript
Stelle
12.3k
Fork
2.3k
Merge medio
1g 19h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di invertase/react-native-firebase

Tutte le issue di invertase/react-native-firebase

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.