成功编码的应用程序无法通过Gatekeeper

时间:2017-02-06 11:22:25

标签: macos code-signing osx-gatekeeper

我正在尝试使用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

但是我在执行App时仍然会收到奇怪的消息框:

" 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

0 个答案:

没有答案