3

我正在尝试使用 codesign 命令行工具对我的应用程序进行签名:

codesign --deep -v -f -s "Developer ID Application: Xxxxxxx Xxxxxxxxxxx (XXXXXXXXXX)" ./MyApp.app

结果似乎是成功的:

./MyApp.app: signed app bundle with Mach-O thin (x86_64) [co.mycompany.myapp]

在我朋友的 Mac 上,系统向我们保证一切正常:

$ codesign -vv --deep-verify ./MyApp.app 
./MyApp.app: valid on disk
./MyApp.app: satisfies its Designated Requirement

$ spctl --assess --type execute --verbose ./MyApp.app 
./MyApp.app: accepted

但是我在执行应用程序时仍然收到那个奇怪的消息框:

无法确认开发者身份,无法打开“MyApp.app”。您的安全首选项只允许安装来自 Mac App Store 和已识别开发者的应用程序。

我究竟做错了什么?如何摆脱那个奇怪的 Gatekeeper 消息框?

其他细节(在我朋友的 Mac 上):

$ codesign -dvvv ./MyApp.app 
Executable=.../MyApp
Identifier=co.mycompany.myapp
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=3983 flags=0x0(none) hashes=119+3 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=52ef9b732b1bbde8a6ec48ca5c951c25d1daee61
CandidateCDHash sha256=eec891344210e1a3dce69900bfbb18e69efc1247
Hash choices=sha1,sha256
CDHash=eec891344210e1a3dce69900bfbb18e69efc1247
Signature size=8927
Authority=Developer ID Application: Xxxxxxxxx Xxxxxxxxxxxxxx (XXXXXXXXXX)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=06 Feb 2017 08:15:35
Info.plist entries=9
TeamIdentifier=YVWF5WN7EA
Sealed Resources version=2 rules=13 files=22
Internal requirements count=1 size=176
4

0 回答 0