macOS builds without an Xcode project end up with a broken code signature (Apple.Core edits the .app after Unity signs it)
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 領域
- build-system, desktop
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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);
}
- 主要語言
- C#
- 星號
- 1k
- 分支
- 257
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apple/unityplugins 的其他 Issue
-
bug Plug-in - GameKit Plugin-in - Core
難度 4/5 3-5 天 新手友好度 55/100
apple/unityplugins#133 · 已指派 1 人 ·
-
bug Plugin-in - Core
難度 3/5 1-2 天 新手友好度 65/100
apple/unityplugins#131 · 已指派 1 人 ·
-
bug Plugin-in - Core
難度 4/5 3-5 天 新手友好度 55/100
apple/unityplugins#125 · 2 則留言 ·
-
Crash Issue On macOS 27 With Game Kit可能已有人在做 @ryzngard 於 40 天前認領。 未關閉bug Plug-in - GameKit
難度 4/5 3-5 天 新手友好度 35/100
apple/unityplugins#124 · 已指派 1 人 ·
-
Arguments for Push Message localisation in SendExchange do not seem to work可能重新可做 @ryzngard 於 169 天前認領,目前沒有進行中的 PR。 未關閉bug Plug-in - GameKit
apple/unityplugins#98 · 2 則留言 · 已指派 1 人 ·
查看 apple/unityplugins 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
area-ai untriaged
難度 2/5 1-3 小時 新手友好度 78/100
dotnet/extensions#7956 ·
維護者通常 1 天內回覆
-
bug needs-triage
難度 2/5 1-3 小時 新手友好度 67/100
microsoft/microsoft-ui-reactor#1567 ·
維護者通常 1 天內回覆
-
priority:p2
難度 2/5 1-3 小時 新手友好度 82/100
QuantConnect/Lean#10191 · 1 則留言 ·
維護者通常 1 天內回覆
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
難度 2/5 1-3 小時 新手友好度 76/100
openclaw/openclaw-windows-node#2287 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆