1

我有一个要提交到 Mac App Store 的应用程序。它对符号进行编码没有任何问题,按预期生成 .pkg 文件......

codesign -s "$app_cert" -f "$app_name.app"
codesign -d -vvvv "$app_name.app"
productbuild --component "$app_name.app" /Applications --sign "$installer_cert" "$app_name.pkg"

...一切似乎都运行良好,没有错误,一切正常。然后我使用以下命令测试安装应用程序...

sudo installer -store -pkg MyApp.pkg -target /

...一切似乎都很好。然后我双击我的应用程序文件夹中的应用程序,它要求我输入我的 iTunes 帐户信息。我使用我在 iTunes Connect 中设置的测试用户帐户,然后我收到此错误:

"MyApp" is damaged and can’t be opened. Delete "MyApp" and download it again from the App Store.

真正奇怪的是,这是对 MyApp 的更新。我第一次提交,一切正常。直到现在我才看到这个问题,但我无法弄清楚出了什么问题。控制台日志中没有错误。

我已经三重检查了,我的整个驱动器上没有其他 MyApp.app ,因为已知这会导致问题。

有谁知道发生了什么?我已经辞职并打包了这个应用程序 10 次,没有任何变化。我试过从几台不同的机器安装,同样的错误。自从首次提交工作以来,我的构建环境没有任何显着变化。

4

2 回答 2

1

我有同样的问题。

问题是我们在两个地方都有应用程序版本号——在 XCode 项目中,以及在收据验证代码中硬连线;当我们更新收据验证版本以匹配它工作的 XCode 项目时。

于 2012-01-14T00:35:58.430 回答
0

The error message can appear even if your receipt validation code is correct, apparently because a caching issue can cause the test receipt to be downloaded with an incorrect version number.

In that case, restart the computer to clear up the caching issue, and run a clean build (or delete the test receipt from the app bundle) to obtain a new test receipt. See this post on the developer forums for additional comment.

于 2013-06-28T15:01:04.200 回答