Wednesday, June 22, 2022 [Tweets] [Favorites]

Broken Renewal of MAS Receipts

Lukas Kubanek (FB9789052, tweet):

I started integrating on-device App Store receipt validation into my Mac app, currently not utilizing StoreKit for any kind of in-app purchases. I followed the documentation and employed a check that calls exit(173) if the receipt is invalid. According to the documentation, this should trigger a renewal of the receipt. When I launch the app from Xcode’s build folder for the first time, I get correctly presented with the App Store login window. After entering credentials of a sandbox user configured in App Store Connect, the app quits, relaunches, and then the following dialog appears:

“MyApp” is damaged and can’t be opened. Delete “MyApp” and download it again from the App Store.

This has been broken since around the release of Monterey. This makes it impossible to test the Mac App Store builds of my apps before submitting them to the store. Fortunately, my receipt validation code is already written and working reliably, because I don’t know how I could fully test it without being able to download a receipt.

The mentioned issue doesn’t only occur in the sandbox but also for production apps. When removing the _MASReceipt folder from the production app, it’s supposed to renew the receipt when launched. Instead, the same dialog informing about the damaged app is shown, and the app has to be re-downloaded entirely from the Mac App Store.


Update (2022-06-27): Oddly, Apple seems to have fixed the longstanding problem the next day.

1 Comment

If it's the same problem as before, the workaround I found was to ignore the directions from Apple on Mac receipt validation and instead follow the iOS directions.

I wrote about it

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment