Some of my customer has this error after update to macOS 15, and one customer has this problem with macOS14.
Unable to validate “Acana My Coins” with the Mac App Store
707 - Receipt hash failed may be for another Mac Please delete this copy of “Acana My Coins” and use the App Store application to download a fresh copy.
AppStore Receipt is check in the application with “OW StoreKit”
Delete application and install it from the AppStore doesn’t help. Apple 2nd level support team say to the customer, the problem ist not on the AppStore or on macOS, it is a problem with the application.
I think Apple removed some long deprecated functions in macOS 15 - things like “Exit(173)” do no longer work. I got a message testing my MAS apps with Sequoia Beta that this API is no longer available…
If you have a MBS license you can switch from the OW-Storekit to the corresponding MBS functions…
Starting a few days ago, receipt validation doesn’t work any more, in any form – not the old code from Sam and Tempelton, not Sam’s OW StoreKit, not MSB plugins, nothing works. Apple seems to have changed something in the latest OS.
According to Apple, my app exits with the code 173, and I’m using MBS. The function for that is AppReceiptVerificatorMBS.ExitApp(173) So that seems to work, contrary to what you’re saying.
However, the receipt verification is not working. Apple has rejected the submission four times now. Each time, their report says the package is damaged and can’t be opened, and they say this is because the receipt is not being verified correctly.
Receipt verification worked for other submitted apps a few weeks ago, I changed nothing in the verification code, and now it doesn’t work. Apple changed something, who knows what. I keep making tweaks based on what I read elsewhere here on the forum and from responses from Christian at MBS, and so far nothing works.
If you use MBS and it’s working, could you please post your code?
Using “ExitApp(173)” ended with a dialog warning that this API is no longer supported (tested with Sequoia Beta).
Okay, my last updates have been uploaded to the MAS three days before Sequoia was released - I did replace the old code from Saw Rowland and Thomas Tempelmann with the MBS way.
In App.Opening
// use rootcertificate to validate receipt
AppReceiptMBS.setAppleRootCertificate AppleIncRootCertificate
// check internal receipt, if available
Receipt = AppReceiptMBS.bundleReceipt
// verify app receipt
Var v As New AppReceiptVerificatorMBS
v.bundleIdentifier = "com.business.app" // your bundle id here
v.bundleVersion = App.Version
// stop, if we have no receipt to check
If Receipt = Nil Then
AppStoreModule.GetReceipt
End If
If Not v.verifyReceipt(receipt) Then
// MessageBox("AppReceipt: invalid: " + v.FailReason)
AppStoreModule.GetReceipt
End If
GetReceipt:
ReceiptRequest = New mySKReceiptRefreshRequest
ReceiptRequest.Start
Thanks. Interestingly, this looks quite different from what I was using, and everything else I’ve seen on this forum concerning MAS receipt verification.
Nobody will be able to adopt your code without more information, including access to your AppStoreModule. This is a very problematic issue which all of us who submit apps to the app store face. Apparently you’ve got things working … would you be able to share your code + module with the Xojo community?
Christian has two exemples in /examples/MacCloud/Store Kit Test and /examples/MacCloud/Verify App Receipt and In-App-Purchases. I am using a combination of both to validate receipts and in-app-purchases and to handle in-app-purchases.
The AppleIncRootCertificate.cer in the MBS example is a file from 2014. Is that still a valid certificate? I don’t see any way to get a current version of this certificate. I never used this and never had a problem before, but maybe it’s why things are failing now, no idea.
I just gotten my app approved on the AppStore and using MBS, my code looks like this
dim a as new AppReceiptVerificatorMBS
dim f as FolderItem
f = app.ExecutableFile.Parent.Parent
f = f.Child("_MASReceipt").Child("receipt")
try
Dim r As AppReceiptMBS = AppReceiptMBS.receiptForFile(f)
a.bundleversion = App.Version
a.bundleIdentifier = "com.mycompany.myapp"
if a.verifyReceipt(r) then
// my codes
else
a.ExitApp 173
end if
Exception
a.ExitApp 173
end try
Hi Edwin. That’s exactly what I had before, and it failed, so I started looking for reasons …
If that worked for you, then something else is causing my app to be damaged?
Here are the steps I go through:
build and codesign the app, sandboxed with entitlements, create .pkg
install the package in test user account
the app prompts to sign into an Apple account, correct so far
after successful sign in, a notice appears that the app is damaged and should be downloaded again. Apple says this is because the receipt is not being verified properly. When I look inside the app Contents, there is no _MASReceipt folder.
?
EDIT: likewise, apps submitted to MAS that I thought were fine came back to me with the following message from Apple: "We noticed that with a valid receipt installed, your app quits on launch. The Console reports the app “Exited with exit code: 173” and the OS states the app “is damaged and can’t be opened.” This generally indicates that the app is not verifying its receipt correctly.”
ReceiptRequest = New mySKReceiptRefreshRequest
ReceiptRequest.Start
Thomas, this appears nowhere in any MBS example (I just downloaded the latest MBS to make sure about this). Would you care to share the rest of the code / share the module? Thanks in advance.
Public Sub GetReceipt()
ReceiptRequest = New mySKReceiptRefreshRequest
ReceiptRequest.Start
End Sub
with a property called “ReceiptRequest” of type “mySKReceiptRefreshRequest”.
Create a subclass called “mySKReceiptRefreshRequest” with “SKReceiptRefreshRequestMBS” as super and add two event handlers:
Sub didFailWithError(error as NSErrorMBS) Handles didFailWithError
// show messagebox
MessageBox("Error " + error.code.toString + EndOfLine + EndOfLine + error.localizedDescription + EndOfLine + error.localizedFailureReason)
// end request and app
ReceiptRequest.TerminateForInvalidReceipt
ReceiptRequest.cancel
End Sub
and
Sub didFinish() Handles didFinish
App.CheckAppReceipt // try verifiying app receipt again
End Sub
App.CheckAppReceipt is my method of verifying the receipt…
In case Receipt is Nil, AppStoreModule.GetReceipt will be called twice. So you should add a line to exit after the first Nil check.
// stop, if we have no receipt to check
If Receipt = Nil Then
AppStoreModule.GetReceipt
exit
End If
Also, if the receipt object runs another verification check in a different method, it would be better to call that method in your Open event rather than have the same (or similar) code in two places.