macos - Mac App Store 测试收据验证(来自receigen) "app is damaged and can' 无法打开。”

标签 macos mac-app-store receipt-validation receigen

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

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

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

我使用的是 macOS 10.14.3 和 Xcode 10.2。

这是我的receigen生成代码的标题:

//    
// 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.    
//

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

enter image description here

我浏览了Receigen's diagnostic page查看可能的解决方案,但没有任何帮助:

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

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

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

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

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

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

这是我在控制台中找到的内容:

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)"

这是控制台的完整部分:

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.)'

最佳答案

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

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

<小时/>

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

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

关于macos - Mac App Store 测试收据验证(来自receigen) "app is damaged and can' 无法打开。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55600173/

相关文章:

macos - OSX 上的 IntelliJ Idea 2016 内存问题

macos - 如何配置 Visual Studio 代码以使用 Mac 的标准选项卡切换快捷方式?

ios - 如何在iOS中使用RMStore获取自动续订订阅的通知

ios - 是否有必要在 iOS 中启动时验证/刷新应用商店收据?

java - 如何提供对 Windows jre 中不存在但 mac jre 中存在的类的引用

swift - 如何在 Swift 中获取 NSAppleScript PID?

xcode - 适用于 Mac App Store 的多语言应用程序 - 在哪里设置 Mac App Store 中显示的语言?

cocoa - 应用沙箱 : renaming a file doesn't work

xcode - 错误: The associated package identity has expired

ios - App Review环境中appStoreReceiptURL的路径名是什么?