【发布时间】:2021-01-08 12:48:24
【问题描述】:
我有一段时间没有接触过的 Mac 应用程序。现在,it appears that something around running apps with Mac App Store integrations has changed since macOS Catalina。
当我从 XCode 启动应用程序时,它会崩溃并显示退出代码 173 并记录如下,然后提示使用我的 Apple ID 登录,我尝试将这两种生活都作为沙盒 Apple ID。
无论我使用哪个 Apple ID 登录,都会以错误结尾:«“Appname”已损坏,无法打开。»
日志
Could not check for receipt presence for some reason... Error Domain=NSCocoaErrorDomain Code=260 "The file “receipt” couldn’t be opened because there is no such file." UserInfo={NSURL=Contents/_MASReceipt/receipt -- file:///Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/, NSFilePath=/Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/Contents/_MASReceipt/receipt, NSUnderlyingError=0x600000c86310 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-01-08 13:23:07.867823+0100 *********s[87637:4910885] Failed fetch receipt with error: The file “receipt” couldn’t be opened because there is no such file.
Could not check for receipt presence for some reason... Error Domain=NSCocoaErrorDomain Code=260 "The file “receipt” couldn’t be opened because there is no such file." UserInfo={NSURL=Contents/_MASReceipt/receipt -- file:///Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/, NSFilePath=/Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/Contents/_MASReceipt/receipt, NSUnderlyingError=0x600000c8dd40 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-01-08 13:23:07.869011+0100 *********s[87637:4910885] Failed fetch receipt with error: The file “receipt” couldn’t be opened because there is no such file.
Could not reach receipt URL: Optional(Error Domain=NSCocoaErrorDomain Code=260 "The file “receipt” couldn’t be opened because there is no such file." UserInfo={NSURL=Contents/_MASReceipt/receipt -- file:///Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/, NSFilePath=/Users/******/Library/Developer/Xcode/DerivedData/*********-egqjyklohxjyjqcvtxjmwzdxvxhv/Build/Products/Debug/**********.app/Contents/_MASReceipt/receipt, NSUnderlyingError=0x600000c8ddd0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}})
2021-01-08 13:23:07.882384+0100 *********s[87637:4910885] No receipt found! Will exit with 173 to let macOS handle renewing a receipt from the App Store.
设置
- macOS 10.15.7 (19H114)
- XCode 12.3 (12C33) // 也用 XCode 11.7 尝试过 → 相同
- 使用有效的开发证书签名的应用
【问题讨论】:
-
好吧,社区没有回答我的问题。通过我自己在应用程序项目中使用 5 年以上的代码和我的私有 Carthage 框架进行了大量挖掘和调试后,我意识到这些日志都是由我自己的代码生成的。事件 173 退出是由我自己按照 Apple 的Validating Receipts Locally Guide 实现的。
-
经验教训:做好功课并为您的项目创建文档。 ??? ??? FutureMe 将对此表示感谢。
标签: xcode macos-catalina storekit mac-app-store