docs(macos): DMG 内附首次打开引导(ad-hoc 签名 Gatekeeper 提示)#318
Merged
Conversation
macOS 包为 ad-hoc 签名(codesign --sign -,无付费 Developer ID / 公证), 用户从下载的 DMG 拖出的 app 带 com.apple.quarantine,首次打开报「已损坏, 应移到废纸篓」,且「右键→打开」对此提示无效,须 xattr -cr 清除隔离属性。 在 DMG 内附一份中英文首次打开引导(build/macos-dmg-open-guide.txt),教用户 拖入 Applications 后运行 xattr -cr /Applications/FlowZ.app。文件名带序号 0 让它 在 Finder 里排到 app 前、更显眼。 过渡止血方案;根治需 Developer ID + 公证(零操作打开),另行评估。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
macOS 包为 ad-hoc 签名(
codesign --force --deep --sign -,无付费 Developer ID / 公证)。用户从浏览器下载 DMG → OS 打com.apple.quarantine→ 拖出的 app 继承 → Gatekeeper 判定 ad-hoc + quarantine + 未公证 = 「"FlowZ.app" 已损坏,无法打开,应将它移到废纸篓」。关键:此提示("damaged")「右键→打开」无效(那只对"无法验证开发者"有效),必须
xattr -cr清除隔离属性才能打开。普通用户不知道,直接以为软件坏了。修复(过渡止血)
DMG 内附一份中英文首次打开引导
build/macos-dmg-open-guide.txt,教用户拖入 Applications 后运行:文件名带序号
0让它在 Finder 里排到 FlowZ.app 前、更显眼。为什么不是自动修复
打包侧无法在 app 首次打开前自动清 quarantine——quarantine 是用户下载时 OS 加的,而 app 被 Gatekeeper 拦住根本没启动,app 内逻辑跑不了;DMG 内放 .command 脚本同样带 quarantine 被拦。所以只能引导用户手动清。
根治方向(另行评估)
Developer ID + 公证(Apple Developer $99/年)是唯一零用户操作的解:下载拖入即开,顺带根治 ad-hoc 的 TCC 逐版重置 / Keychain ACL / 登录项等债。本 PR 是拿到证书前的过渡。
验证
release.yml YAML 校验通过。DMG 实际产出需下次 release 的 CI(macOS runner + hdiutil)验证:挂载 DMG 确认说明文件在、文件名中文正常显示、排在 app 前。本地 Linux 无法跑 hdiutil。