Mac App Store 测试收据验证(来自receigen)“应用程序已损坏且无法打开。”

Ken*_*and 5 macos mac-app-store receipt-validation receigen

我正在使用 Receigen ( http://receigen.etiemble.com/ ) 为我的一款 MacOS 应用程序进行收据验证。多年来,这种方法一直运作良好,但有些事情发生了变化。我已经有一年左右没有对此应用程序进行更新并提交了更改,但由于收据验证不起作用而被拒绝。

\n\n

当我尝试在本地测试收据时,它会弹出应用程序商店登录,我输入我的电子邮件+密码,然后收到“应用程序已损坏”消息。

\n\n

我使用 Receigen 代码助手生成验证代码(它生成收据验证代码并尽可能随机化,这样您就不能轻松破解每个使用 receigen 的应用程序)。

\n\n

我正在使用 macOS 10.14.3 和 Xcode 10.2。

\n\n

这是我的 receiveigen 生成代码的标头:

\n\n
//    \n// This code was generated by RECEIGEN 4.0.4 on 2019-04-08 15:54:01 and will use:    \n//    \n// Bundle Identifier            : com.inadaydevelopment.mac10biiFinancialCalculator    \n// Bundle Version               : 2.1.0    \n// Receipt Identifier           : com.inadaydevelopment.mac10biiFinancialCalculator    \n// Receipt Version              : 2.1.0    \n//    \n// Language                     : ObjC    \n// Platform                     : OSX    \n// Code Prefix                  : ReceiptValidation    \n// Success Behavior             : RunApplication    \n// Failure Behavior             : ExitWith173    \n//    \n// Certificate Name             : Apple Root CA    \n// Certificate Fingerprint      : 611E5B662C593A08FF58D14AE22452D198DF6C60    \n// Signer Certificate OID       : 1.2.840.113635.100.6.11.1    \n//    \n// OpenSSL Version              : 1.0    \n//    \n// This generated code has to be linked with OpenSSL libcrypto (either statically or dynamically)    \n// Refer to the website for more details and specific cases.    \n//\n
Run Code Online (Sandbox Code Playgroud)\n\n

我已经验证 Bundle Id 和 Version 与 XCode 中的内容相匹配(文本字段不够长,但它确实以 com.inaday 开头...):

\n\n

在此输入图像描述

\n\n

我查看了Receigen 的诊断页面以查看可能的解决方案,但没有任何帮助:

\n\n

1)我在控制台中查看/搜索了任何“storeagent”条目,但从未找到任何条目。也许诊断页面包含旧版本 macOS 的信息?

\n\n

2)我执行了“killall”和“rm -r”命令来修复与损坏的消息相关的任何缓存问题。我也重启了好几次。

\n\n

3)我查看了应用程序包内部,没有看到任何收据。

\n\n

4)我删除了据我所知该应用程序的唯一另一个副本(我从App Store安装的那个)并再次尝试了所有操作。同样的问题。

\n\n

5)尝试移除容器。同样的问题。

\n\n

6)我尝试了“sudo pkill -f CommerceKit”。同样的问题。

\n\n

这是我在控制台中发现的:

\n\n
\n

ReceiptRefreshRequest:获取收据时出错\n /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii\n Financial Calculator.app - 错误域=com.apple.commerce.server\ n 代码=500317“(空)”

\n
\n\n

这是控制台的完整部分:

\n\n
default 11:52:42.776265 -0700   commerce    StoreSession: StatusCode: 200; <private>; Environment: SB; URL: https://p100-sandbox.itunes.apple.com/WebObjects/MZFinance.woa/wa/createAppReceipt\ndebug   11:52:42.776776 -0700   commerce    looked up value <private> for key PrimaryAccount:1 in CFPrefsPlistSource<0x7fe4eb803860> (Domain: com.apple.appstore.commerce, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)\ndebug   11:52:42.776811 -0700   commerce    looked up value <private> for key KnownAccounts:1 in CFPrefsPlistSource<0x7fe4ea6058a0> (Domain: com.apple.commerce, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)\ndebug   11:52:42.776909 -0700   commerce    Handling response <private> for URL <private>...\ndebug   11:52:42.776943 -0700   commerce    No handling for HTTP status code 200 in response for URL <private>\ndefault 11:52:42.777268 -0700   storeuid    ReceiptRefreshRequest: Error fetching receipt for /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii Financial Calculator.app - Error Domain=com.apple.commerce.server Code=500317 "(null)"\ndebug   11:52:42.777338 -0700   storeuid    Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: MacAppStore, localizationName: (null), result: APP_IS_DAMAGED_TITLE\ndebug   11:52:42.777400 -0700   storeuid    Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: Localizable, localizationName: (null), result: \xe2\x80\x9c%@\xe2\x80\x9d is damaged and can\xe2\x80\x99t be opened. Delete \xe2\x80\x9c%@\xe2\x80\x9d and download it again from the App Store.\ndebug   11:52:42.777427 -0700   storelegacy Bundle: <private>, key: com.apple.commerce.server, value: com.apple.commerce.server, table: Error, localizationName: (null), result: com.apple.commerce.server\ndebug   11:52:42.777496 -0700   storeuid    Resource lookup at <private>\n    Request       : appStore type: icns\n    Result        : file:///System/Library/PrivateFrameworks/CommerceKit.framework/Resources/appStore.icns\ndebug   11:52:42.777471 -0700   storelegacy Bundle: <private>, key: The operation couldn\\U2019t be completed. (%@ error %ld.), value: The operation couldn\\U2019t be completed. (%@ error %ld.), table: Error, localizationName: (null), result: The operation couldn\xe2\x80\x99t be completed. (%1$@ error %2$ld.)\ndebug   11:52:42.777544 -0700   storeuid    Bundle: <private>, key: OK, value: , table: MacAppStore, localizationName: (null), result: OK\ndefault 11:52:42.777540 -0700   storelegacy StoreLegacy: Failed to renew receipt for application at path /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii Financial Calculator.app : \'The operation couldn\xe2\x80\x99t be completed. (com.apple.commerce.server error 500317.)\'\n
Run Code Online (Sandbox Code Playgroud)\n

Ken*_*and 2

在这里找到答案,复制如下,以防原件消失: https://forums.developer.apple.com/thread/92419

问题是我尝试使用普通的 iTunes 帐户登录。


...用户必须使用沙盒测试用户 Apple ID,而不是他们自己的 Apple ID,当时我并不清楚。另外,我发现用户需要使用自己的 Apple ID 注销 Mac App Store,以便能够在需要时输入沙盒测试用户 Apple ID。

但是,沙盒测试用户帐户是特定于国家/地区的。因此,每个国家/地区都需要一个沙盒测试用户。现在,我为新国家/地区的用户提供了非常相似的错误消息。我可能必须使用另一个 DTS 请求来解决这个问题。