有效但不匹配的证书
将应用程序提交到 Mac App Store 时可能会发生此错误。发生错误是因为一个或多个代码签名有效但未由 Mac App Store 适当的证书签名:
Invalid Signature - The nested app bundle FRAMEWORK at path APPNAME.app/Contents/Frameworks/FRAMEWORK.framework has following signing error(s): valid on disk /Volumes/data01/app_data/dstr/mz_4939925606610311185dir/mz_6704668226144376567dir/eu.miln.beyond.mas.pkg/Payload/APPNAME.app/Contents/Frameworks/FRAMEWORK.framework/Versions/A: satisfies its Designated Requirement test-requirement: code failed to satisfy specified code requirement(s) . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
解决方案是重新设计应用程序包,确保使用 Mac App Store 应用程序证书。
协同设计
使用codesign -d -vvvv <app.path>
来检查签名证书是否正确。
如果您有一个带有混合证书或非 Mac App Store 证书的复杂签名应用程序,您可以使用该codesign
标志deep
递归地重新签署整个捆绑包:
codesign --force -o library -s '3rd Party Mac Developer Application: Your Organisation (000AAA000A)' --keychain '/absolute/path/to/mac-app-store.keychain' --preserve-metadata=identifier,entitlements,flags --deep '/absolute/path/to/APPLICATION.app'
注意--preserve-metadata=identifier,entitlements,flags
选项。这些对于避免覆盖或更改关联的权利和捆绑标识符非常重要。
理想情况下,deep
不应使用该标志,但它可用于解决问题。