我正在使用Receigen (http://receigen.etiemble.com/)为我的MacOS应用程序进行收据验证。这几年来效果很好,但有些事情已经改变了。我已经一年左右没有更新这个应用程序了,并提交了一个更改,但由于收据验证不起作用,它被拒绝了。
当我尝试在本地测试收据时,它会弹出App登录名,输入我的email+password,然后得到"app被损坏“的消息。
我使用Receigen代码助手生成验证代码(它生成收据验证代码,并尽可能多地随机化,这样您就不能轻易破解每个使用receigen的应用程序)。
我使用的是macOS 10.14.3和Xcode 10.2。
这是我的接收程序生成的代码的标题:
//
// This code was generated by RECEIGEN 4.0.4 on 2019-04-08 15:54:01 and will use:
//
// Bundle Identifier : com.inadaydevelopment.mac10biiFinancialCalculator
// Bundle Version : 2.1.0
// Receipt Identifier : com.inadaydevelopment.mac10biiFinancialCalculator
// Receipt Version : 2.1.0
//
// Language : ObjC
// Platform : OSX
// Code Prefix : ReceiptValidation
// Success Behavior : RunApplication
// Failure Behavior : ExitWith173
//
// Certificate Name : Apple Root CA
// Certificate Fingerprint : 611E5B662C593A08FF58D14AE22452D198DF6C60
// Signer Certificate OID : 1.2.840.113635.100.6.11.1
//
// OpenSSL Version : 1.0
//
// This generated code has to be linked with OpenSSL libcrypto (either statically or dynamically)
// Refer to the website for more details and specific cases.
//我已经验证了绑定Id和版本是否与我在XCode中的匹配(文本字段不够长,但它确实以com.inaday.开头):

我通过雷基根诊断页查看了这方面的可能解决方案,但没有任何帮助:
1)我在控制台中查找/搜索任何“商店代理”条目,但从未找到任何条目。也许诊断页面中有关于较旧版本的macOS的信息?
2)我执行了"killall“和"rm -r”命令来修复与损坏的消息相关的任何缓存问题。我也重新启动了几次。
3)我查看了应用程序包,但没有看到任何收据。
4)我删除了我所知道的该应用程序的唯一其他副本(我从app安装的应用程序),并再次尝试了所有的东西。同样的问题。
5)试着移除集装箱。同样的问题。
( 6)我试过"sudo -f CommerceKit“。同样的问题。
这就是我在我的控制台里发现的:
/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)“
下面是控制台的完整部分:
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
debug 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)
debug 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)
debug 11:52:42.776909 -0700 commerce Handling response <private> for URL <private>...
debug 11:52:42.776943 -0700 commerce No handling for HTTP status code 200 in response for URL <private>
default 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)"
debug 11:52:42.777338 -0700 storeuid Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: MacAppStore, localizationName: (null), result: APP_IS_DAMAGED_TITLE
debug 11:52:42.777400 -0700 storeuid Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: Localizable, localizationName: (null), result: “%@” is damaged and can’t be opened. Delete “%@” and download it again from the App Store.
debug 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
debug 11:52:42.777496 -0700 storeuid Resource lookup at <private>
Request : appStore type: icns
Result : file:///System/Library/PrivateFrameworks/CommerceKit.framework/Resources/appStore.icns
debug 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’t be completed. (%1$@ error %2$ld.)
debug 11:52:42.777544 -0700 storeuid Bundle: <private>, key: OK, value: , table: MacAppStore, localizationName: (null), result: OK
default 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’t be completed. (com.apple.commerce.server error 500317.)'发布于 2019-05-28 20:19:04
在这里找到答案,复制到下面,以防原来的内容消失:https://forums.developer.apple.com/thread/92419
问题是,我试图使用我的普通iTunes帐户登录。
..。用户必须使用沙箱测试用户Apple ID,而不是他们自己的Apple ID,当时我还不清楚这一点。此外,我发现用户需要用自己的Apple ID从Mac登录,以便能够在请求时输入Sandbox用户Apple。
但是,Sandbox用户帐户是特定于国家的。所以每个国家都需要一个沙箱测试用户。现在,对于一个新国家的用户,我有非常相似的错误信息。我可能需要使用另一个DTS请求来解决它。
https://stackoverflow.com/questions/55600173
复制相似问题