macOS builds without an Xcode project end up with a broken code signature (Apple.Core edits the .app after Unity signs it)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- build-system, desktop
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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);
}
- Linguagem predominante
- C#
- Estrelas
- 1k
- Forks
- 257
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apple/unityplugins
-
bug Plug-in - GameKit Plugin-in - Core
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
apple/unityplugins#133 · 1 responsável ·
-
bug Plugin-in - Core
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
apple/unityplugins#131 · 1 responsável ·
-
bug Plugin-in - Core
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
apple/unityplugins#125 · 2 comentários ·
-
Crash Issue On macOS 27 With Game KitTalvez já em andamento @ryzngard assumiu há 40 dias. Abertabug Plug-in - GameKit
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
apple/unityplugins#124 · 1 responsável ·
-
Arguments for Push Message localisation in SendExchange do not seem to workTalvez livre de novo @ryzngard assumiu há 169 dias e não há nenhum pull request aberto. Abertabug Plug-in - GameKit
apple/unityplugins#98 · 2 comentários · 1 responsável ·
Todas as issues de apple/unityplugins
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
area-ai untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
dotnet/extensions#7956 ·
Mantenedores costumam responder em até 1 dia
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
microsoft/microsoft-ui-reactor#1567 ·
Mantenedores costumam responder em até 1 dia
-
priority:p2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
QuantConnect/Lean#10191 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
openclaw/openclaw-windows-node#2287 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia