macOS builds without an Xcode project end up with a broken code signature (Apple.Core edits the .app after Unity signs it)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- build-system, desktop
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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);
}
- Vorherrschende Sprache
- C#
- Sterne
- 1k
- Forks
- 257
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apple/unityplugins
-
bug Plug-in - GameKit Plugin-in - Core
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
apple/unityplugins#133 · 1 zugewiesene Person ·
-
bug Plugin-in - Core
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
apple/unityplugins#131 · 1 zugewiesene Person ·
-
bug Plugin-in - Core
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
apple/unityplugins#125 · 2 Kommentare ·
-
Crash Issue On macOS 27 With Game KitEvtl. vergeben @ryzngard hat das vor 40 Tagen übernommen. Offenbug Plug-in - GameKit
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
apple/unityplugins#124 · 1 zugewiesene Person ·
-
Arguments for Push Message localisation in SendExchange do not seem to workEvtl. wieder frei @ryzngard hat das vor 169 Tagen übernommen, und es ist kein Pull Request offen. Offenbug Plug-in - GameKit
apple/unityplugins#98 · 2 Kommentare · 1 zugewiesene Person ·
Alle Issues in apple/unityplugins
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
area-ai untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
dotnet/extensions#7956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
microsoft/microsoft-ui-reactor#1567 ·
Maintainer antworten meist innerhalb von 1 Tag
-
priority:p2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
QuantConnect/Lean#10191 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
openclaw/openclaw-windows-node#2287 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag