macOS builds without an Xcode project end up with a broken code signature (Apple.Core edits the .app after Unity signs it)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- build-system, desktop
Direzione di ricerca
Start with AppleBuild.OnPostProcessBuild and the Info.plist, frameworks, and entitlements steps described in the issue; check how the build target and Xcode project setting are detected. Reproduce with a plain macOS .app and run codesign --verify --deep --strict --verbose=2 on it. Done means the resulting app verifies successfully and follows the issue’s expected handling of settings, bundles, and signing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When building for macOS with "Create Xcode Project" off (a plain .app, e.g. for Steam), AppleBuild.OnPostProcessBuild changes the .app after Unity has already signed it, and nothing signs it again:
- Automate Info.plist rewrites
Contents/Info.plist(addsITSAppUsesNonExemptEncryption, plusLSMinimumSystemVersionwhen Apple Build Settings has a minimum macOS version). - The frameworks step copies
AppleCoreNativeMac.bundle,GameKitWrapper.bundleand their.dSYMfolders intoContents/PlugIns. - Automate Entitlements writes
<Product Name>.entitlementsnext to the .app, where nothing uses it.
In one of our Steam builds, the Info.plist hash stored in the main executable's ad-hoc signature no longer matches Contents/Info.plist, and _CodeSignature/CodeResources lists every bundle in Contents/PlugIns except AppleCoreNativeMac.bundle and GameKitWrapper.bundle.
To Reproduce
- Project with Apple.Core and Apple.GameKit, Automate Info.plist and Automate Entitlements on (the defaults).
- Build for macOS with Create Xcode Project off.
- Run
codesign --verify --deep --strict --verbose=2on the built .app. It fails.
Expected behavior
The .app Unity produced stays validly signed. The Info.plist keys and the entitlements file are App Store settings a plain .app can't use, so skip them in this case (or apply them before Unity signs). Keep .dSYM folders out of Contents/PlugIns, and re-sign the .app after copying the plug-in bundles into it.
Environment
Unity 6000.6, macOS Standalone (Apple Silicon), Create Xcode Project off. Seen with Apple.Core 3.2.0 / Apple.GameKit 4.0.1; the code is unchanged in 3.3.0 / 4.1.0 (27.0, ffe6174) and on main (96e4a04).
Additional context
What we patch into our embedded copy:
bool isPlainMacApp = buildTarget == BuildTarget.StandaloneOSX && !AppleNativeLibraryUtility.IsXcodeProjectGeneratedForMac;
// skip the Info.plist and entitlements regions when isPlainMacApp, then after the finalize step:
if (isPlainMacApp)
{
// runs /usr/bin/codesign --force --sign - "<app>" (ad-hoc, the way Unity signed it)
ResignPlainMacApp(generatedProjectPath);
}
- Lingua principale
- C#
- Stelle
- 1k
- Fork
- 257
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apple/unityplugins
-
bug Plug-in - GameKit Plugin-in - Core
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
apple/unityplugins#133 · 1 assegnatario ·
-
bug Plugin-in - Core
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
apple/unityplugins#131 · 1 assegnatario ·
-
bug Plugin-in - Core
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
apple/unityplugins#125 · 2 commenti ·
-
Crash Issue On macOS 27 With Game KitForse già presa @ryzngard l’ha presa 40 giorni fa. Apertabug Plug-in - GameKit
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apple/unityplugins#124 · 1 assegnatario ·
-
Arguments for Push Message localisation in SendExchange do not seem to workForse di nuovo libera @ryzngard l’ha presa 169 giorni fa e non c’è nessuna pull request aperta. Apertabug Plug-in - GameKit
apple/unityplugins#98 · 2 commenti · 1 assegnatario ·
Tutte le issue di apple/unityplugins
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
area-ai untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dotnet/extensions#7956 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
microsoft/microsoft-ui-reactor#1567 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
QuantConnect/Lean#10191 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openclaw/openclaw-windows-node#2287 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno