用Corona SDK构建的Mac OS应用程序公证不再有效。验证失败。

8
这是我正在运行的命令。以前每次都可以,但现在失败了。 codesign -s "Developer ID Application: <YOUR NAME>" --timestamp --options runtime -f --entitlements entitlements.plist --deep <APP NAME>.app /usr/bin/ditto -c -k --keepParent <APP NAME>.app <APPNAME>.zip xcrun altool --notarize-app --primary-bundle-id "<BUNDLE ID>" -u "<YOUR EMAIL>" -p "<APP SPECIFIC PASSWORD>" --file <YOURAPP>.zip 我会收到一封邮件,里面会说“您的应用程序未经过审核”或其他类似的内容。
这些是我遇到的错误。
{
"logFormatVersion": 1,
"jobId": "69910cca-87c0-44f6-a8ec-a0c8a6a7b614",
"status": "Invalid",
"statusSummary": "Archive contains critical validation errors",
"statusCode": 4000,
"archiveFilename": "MegaHasan.zip",
"uploadDate": "2020-02-05T19:07:48Z",
"sha256": "b6b7c75a0e50a9ec9f238360c674f9345ef6a97d27a21a69e793b7938927eb42",
"ticketContents": null,
"issues": [
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/plugin_bit.dylib",
"message": "The binary is not signed with a valid Developer ID certificate.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/plugin_bit.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/plugin_bit.dylib",
"message": "The binary uses an SDK older than the 10.9 SDK.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/libsteam_api.dylib",
"message": "The binary is not signed with a valid Developer ID certificate.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/libsteam_api.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/plugin_steamworks.dylib",
"message": "The binary is not signed with a valid Developer ID certificate.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Plugins/plugin_steamworks.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Frameworks/CoronaCards.framework/Versions/A/Frameworks/gameNetwork.dylib",
"message": "The binary uses an SDK older than the 10.9 SDK.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "MegaHasan.zip/Mega Hasan.app/Contents/Frameworks/CoronaCards.framework/Versions/A/Frameworks/licensing.dylib",
"message": "The binary uses an SDK older than the 10.9 SDK.",
"docUrl": null,
"architecture": "x86_64"
}
]
}

之前它能够工作的原因是苹果在2019年9月放宽了要求。而它停止工作的原因是他们在2020年2月初恢复了更严格的要求。实际上,你的应用从未达到“真正”的要求。 - Ken Thomases
2个回答

5

只有针对与macOS 10.9或更高版本链接的二进制文件才能进行公证。您必须使用SDK 10.9或更高版本重新链接有问题的库并重新提交应用程序。

在编译和链接未更新的库时,您必须安装至少与10.9相同的XCode macOS SDK并将其用作sysroot。然后,针对新的库重新编译和链接应用程序。通常,使用相同的工具链编译所有dylibs和主要执行二进制文件是一个好习惯。不幸的是,对于任何使用低于10.9 SDK链接的二进制文件,都无法进行公证。


我该怎么做? - hamobi
您必须安装一个至少与10.9同步的XCode macOS SDK,并在编译和链接那些不是最新版本的库时将其用作系统根目录。 - Richard Barber
然后重新编译并链接您的应用程序与新的库。 - Richard Barber
我已经更新了Xcode和Mac OS。这些库是预编译的,所以我可能无法对它们进行太多控制。我注意到如果我使用SD公证工具,除了一个选项之外,所有库都可以通过。该选项是“禁用库验证,允许JIT编译代码”。由于某种原因,那个plugin_bit库仍然会出现一个错误。 - hamobi
在这种情况下,不要使用预编译的dylibs。通常最好使用相同的工具链编译所有dylibs和主执行二进制文件。对于公证,任何与10.9 sdk链接的二进制文件都将无法使用,遗憾地是。 - Richard Barber
@RichardBarber 如果您没有lib的源代码,也无法重新构建它,那么该怎么办呢?请参见https://dev59.com/Hbroa4cB1Zd3GeqPilzL - Paul Taylor

3
我遇到了与Electron的审核过程相关的类似问题,这个过程曾经是可行的,但现在不再可行了。我发现我的一些证书已被吊销,在苹果开发者网站上并没有显示出来,但当我进入Xcode:偏好设置:帐户并单击“管理证书”按钮时,它们会显示出来。
创建新的证书确实让我通过了审核,但现在在使用Application Loader上传时出现签名错误,因此我可能在创建新证书和重新生成预配文件时做错了什么,但希望这可以帮助你解决问题。

谢谢您的回答,但我已经尝试重新生成配置文件了。 - hamobi
感谢您的回答 - 在XCode中将证书视为无效使我朝着正确的方向前进。 - Sators

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接