本文介绍了如何正确对macOS屏幕保护程序进行代码签名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对我的macOS屏幕保护程序项目进行代码签名,以摆脱身份不明的开发人员"警告消息. Apple的文档苹果论坛上的这个人说,您应该使用开发人员ID应用程序"签名证书来执行此操作.但这似乎对我不起作用.

I'm trying to codesign my macOS screensaver project to get rid of the "unidentified developer" warning message. Both Apple's documentation and this person on Apple's forums say that you should use the "Developer ID Application" signing certificate to do it. But that doesn't appear to work for me.

当我遵循 Apple关于如何测试正确签名的说明我得到的响应如下:

When I follow Apple's instructions on how to test for proper signatures the response I get is as follows:

Screensaver.saver: rejected (the code is valid but does not seem to be an app)

我的签名设置如下:

我不确定这时我还应该尝试什么.通常,我担心有传言称未来的Mac应用程序必须进行签名/公证,这对屏幕保护程序意味着什么?

I'm not sure what else I should try at this point. Mostly I'm worried about the rumor future mac apps will have to be signed/notarized and what does that means for screensavers?

推荐答案

以下是其他公证说明:

您不能直接对.saver进行公证,但可以通过一路反复的方式对ZIP文件进行公证,这就是我分发屏幕保护程序的方式.这是我为简单的保护程序使用的步骤,您的行程无疑会有所不同:

You can’t notarize the .saver directly, but you can in a round-about-way notarize a ZIP file, which is how I distribute my screen saver. Here are the steps I use for my simple saver, your mileage will undoubtably vary:

  1. /usr/bin/codesign -f -o runtime --timestamp --sign插入开发人员此处为ID Installer证书标识符" XYXYY.saver
  2. 压缩签名的.saver代码,例如XYZZY.saver.zip
  3. /usr/bin/xcrun altool --verbose --notarize-app --primary-bundle-id在此处插入标识符" -u"[email protected]" -p在Apple中插入应用程序专用的PW这里的ID" -t osx -f XYZZY.saver.zip
  4. 在旁边:将应用专用密码存储在钥匙串中,然后像这样从命令行引用它:
    • /usr/bin/xcrun altool--store-password-in-keychain-item"AC_PASSWORD" -u [email protected] -p在这里从Apple插入应用特定的PW"
  1. /usr/bin/codesign -f -o runtime --timestamp --sign "insert DeveloperID Installer certificate identifier here" XYZZY.saver
  2. compress the code signed .saver e.g. XYZZY.saver.zip
  3. /usr/bin/xcrun altool --verbose --notarize-app --primary-bundle-id "insert identifier here" -u "[email protected]" -p "insert app-specific PW for your Apple ID here" -t osx -f XYZZY.saver.zip
  4. Aside: store the App-specific password in your keychain andreference it from the command line like this:
    • /usr/bin/xcrun altool--store-password-in-keychain-item"AC_PASSWORD" -u [email protected] -p "insert App-specific PW from Apple here"
  • /usr/bin/xcrun altool --notarization-history 0 -u"[email protected]"-p"@keychain:AC_PASSWORD"
  • /usr/bin/xcrun altool --notarization-history 0 -u "[email protected]"-p "@keychain:AC_PASSWORD"
  • /usr/bin/xcrun订书机装订器XYZZY.saver
  • 重新压缩保护程序,然后分发
  • /usr/bin/xcrun stapler staple XYZZY.saver
  • Re-zip the saver anddistribute

这篇关于如何正确对macOS屏幕保护程序进行代码签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 03:16