xcode 如何签署 Mac OS X 应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5341755/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to sign Mac OS X application?
提问by Andrey
I created a Mac OS X application but I don't know which steps I have to do for signing my Mac OS X application correctly. Thank you.
我创建了一个 Mac OS X 应用程序,但我不知道我必须执行哪些步骤才能正确签署我的 Mac OS X 应用程序。谢谢你。
回答by Andy Brice
I found the Apple documentation far too verbose. I have written up some detailed notes on how I signed my own software for Mac. There is too much to put it all here. See: http://successfulsoftware.net/2012/08/30/how-to-sign-your-mac-os-x-app-for-gatekeeper/
我发现 Apple 文档过于冗长。我已经写了一些关于我如何为自己的 Mac 软件签名的详细说明。太多了,不能全部放在这里。请参阅:http: //successfulsoftware.net/2012/08/30/how-to-sign-your-mac-os-x-app-for-gatekeeper/
回答by Stephane Paquet
At first you need an fully functional (and thus paid) Apple developer account. Then you can follow this information: https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
首先,您需要一个功能齐全(因此付费)的 Apple 开发者帐户。然后你可以按照这个信息:https: //developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
The above link is the global procedure, but there is a specific topic with clean illustrated how to at the following URL: https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2
上面的链接是全局程序,但在以下 URL 中有一个具体的主题,清晰说明了如何操作:https: //developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures .html#//apple_ref/doc/uid/TP40005929-CH4-SW2
Hope this helped you.
希望这对你有帮助。
回答by Daniel Georgiev
With Qt
使用 Qt
macdeployqt APP_NAME.app -codesign="Developer ID Application: YOUR NAME (ID_NUMBERS)"
Otherwise
除此以外
codesign --force --verify --verbose --sign "Developer ID Application: YOUR NAME (ID_NUMBERS)" APP_NAME.app
You also need to sign every framework and dylib file into the package with something like this
您还需要使用这样的方式将每个框架和 dylib 文件签名到包中
codesign --force --verify --verbose --sign "Developer ID Application: YOUR NAME (ID_NUMBERS)" APP_NAME.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
codesign --force --verify --verbose --sign "Developer ID Application: YOUR NAME (ID_NUMBERS)" APP_NAME.app/Contents/Plugins/bearer/libqcorewlanbearer.dylib
回答by gnuchu
There is good Apple documentation on this. Go to the developer provisioning section and there is a good primer there that can get you running quickly.
对此有很好的 Apple 文档。转到开发人员配置部分,那里有一本很好的入门书,可以让您快速运行。