My app that's been around since the dawn of the Mac App Store, and which uses its own receipt validation code for 15 years now, recently sometimes triggers a "does not support the latest receipt validation requirements" error message with my app's users.
But I cannot reproduce it, even if I freshly install the app on a M4 Mac running macOS 26.2.
So I have a hard time testing my fix.
Does someone have a sample receipt file they could share with me (including the MAC from "en0" / GUID device ID), or do you know where I can find one that uses the new SHA-256 hash?
In fact - when reading https://developer.apple.com/documentation/appstorereceipts/validating-receipts-on-the-device it seems that there's only a SHA-1 after all. So why do some users get the "receipt validation requirements" message at all? I'm only reading the receipt, decoding the ASN.1 fields and then validate the hash from the receipt (field 5) against the SHA-1 from the GUID+receipt, as always, calling libCrypto's SHA1() function. So, what would even trigger the message, as I'm not invoking any higher-level APIs that would verify the receipt for me, and thus would know when something is wrong?!?
Ahh, finally found the right answer here: https://github.com/iterate-ch/cyberduck/issues/16031
Basically, the default behavior of hiding the actual Mac's MAC address is the cause for the problem ("Privaty Wi-Fi Address"):
If the Mac rotates or replaces the primary network interface's MAC address, and my code still uses the old code that would fetch the MAC from the higher level APIs, it would get the wrong MAC, and then fail the receipt check.
To fix this, the MAC has to be fetched from IOKit registry, e.g. as shown in https://developer.apple.com/documentation/appstorereceipts/validating-receipts-on-the-device or https://lapcatsoftware.com/articles/2023/11/4.html