Gatekeeper是否在OSX/XCode/Mac App Store之外签署OSX DMG? [英] Gatekeeper signing for OSX DMGs outside of OSX/XCode/Mac App Store?
问题描述
通过查看即将发布的OSX版本(OSX Lion之后的版本)的注释,似乎所有DMG/安装程序都需要签名,即使未通过Mac App Store分发也是如此.
From looking at notes for the upcoming OSX version (the one after OSX Lion), it appears that all DMGs/installers need to be signed, even if not distributed via the Mac App store.
尽管如此,我找不到用于执行此签名的命令行工具,也找不到大量有关在不提交至App Store的情况下获取签名证书的文档.
I couldn't find a command-line tool to do this signing though, or much documentation about obtaining a signing cert without submitting to the App Store.
有人可以阐明以下几点: 1)如何在不通过Mac App Store分发应用程序的情况下获得证书? 2)如何在不使用内置XCode工具(最好是跨平台工具)的情况下对DMG进行签名?
Can someone shed light on: 1) How to obtain a certificate without distributing you app via the Mac App Store? 2) How to sign a DMG without using built-in XCode tools (preferable a cross-platform tool)?
谢谢!
推荐答案
超级简单:
CODESIGN_IDENTITY='Name of Code Sign Cert' # Found in Keychain Access
codesign -s "$CODESIGN_IDENTITY" -v path/to/YourApp.app
然后在dmg上
codesign -s "$CODESIGN_IDENTITY" -v path/to/YourApp.dmg
这甚至适用于像UDZO这样的只读DMG.
This even works on read-only DMGs like UDZO.
这篇关于Gatekeeper是否在OSX/XCode/Mac App Store之外签署OSX DMG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!