Privacy manifests are dropped from static XCFrameworks

Aperta
#3,133 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
47/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
build-system

Direzione di ricerca

Start by reading the reverted changes in pull requests #3092 and #3103, then trace how rules_apple packages static XCFrameworks for non-macOS targets. Check how framework contents and nested bundles are copied, and compare the result with Xcode's behavior described in the issue. Done means privacy manifests from static XCFrameworks are present in the app bundle without restoring the regression from #3092.

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

Descrizione

From https://github.com/bazelbuild/rules_apple/pull/3092:

Since Xcode 15, when an app links a static framework XCFramework (via "Embed & Sign" or an SPM binaryTarget), Xcode still links the static library into the app, but also embeds the framework bundle in Frameworks/:

  • Headers, PrivateHeaders, Modules, *.tbd and the static binary are excluded (builtin-copy … -remove-static-executable).
  • An empty dylib is injected as the framework binary ("Injecting stub binary into codeless framework"), built for the app's deployment target, then signed like any embedded framework.
  • Everything else is kept in place, including PrivacyInfo.xcprivacy and nested .bundle directories.

rules_apple currently drops these frameworks entirely, keeping only nested .bundle directories, copied to the app root. As a result, the privacy manifests of SDKs shipped as static XCFrameworks (e.g. Sentry, Braze) never make it into the app.

Unfortunately https://github.com/bazelbuild/rules_apple/pull/3092 got reverted in https://github.com/bazelbuild/rules_apple/pull/3103, so privacy manifests are still being dropped.

As a workaround I'm currently copying each static framework's top-level PrivacyInfo.xcprivacy into a <framework>_Privacy.bundle at the root of the app. While this is similar to what some Pods do (like Firebase), this^ approach is better as it matches what Xcode does.

I'm wondering if embedding only unversioned frameworks for non-macOS targets would be enough to revive that PR? That should resolve the regression that was introduced in https://github.com/bazelbuild/rules_apple/pull/3092

Lingua principale
Starlark
Stelle
600
Fork
354
Merge medio
2g 7h
PR unite (30g)
8

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 bazelbuild/rules_apple

Tutte le issue di bazelbuild/rules_apple

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.