Mac App Store Receipt Validation

Hi all,

has anybody had any success implementing the validation of the receipt of Apps purchased on the Mac App Store (according to Apple’s recommendation to be found here: https://developer.apple.com/devcenter/mac/documents/validating.html)?

We submitted one App, and for the time being we did the same thing everybody else did: we did not use receipt validation. But in the long run it is a must-have feature for any app to be released on the Mac App Store.

This is - of course - also a call to Unity Technologies to implement the necessary changes in 3.2 that allow exiting a game with a specific exit code and executing code before any gui is drawn.

Well, let me know how far you have come along on this issue.

Best,
A.

Receipt validation is not hard… all of our games have it. Apple provide the code on their development site.

Just make a plugin bundle in XCode with the code Apple provide, and access the plugin via Unity (Pro required).

This is not something Unity Dev folk should be spending their time on, as Apple could change their DRM at any moment, and Unity Pro already offers everything we need to do it ourselves.

Cheers :slight_smile:

I had no idea it is that easy.
Aren’t there details that are not supported by unity right now? like exiting the app with a specific error code? Or exiting the app before drawing any UI?

Could you explain how to go about creating a plugin bundle from the Apple provided code? I am doing submissions in the next few days.

THXC
BTH

Wow, you were right, Seon, I got it figured out in a couple of hours. Only thing missing is the exit code thingy. Any notes on that? (Exit the app with code 173)

Care to share with your fellow iOS devs?

BTH

Basically you take this GitHub - roddi/ValidateStoreReceipt: validate the receipt a well-known computer company's application store sends and add a Build Target that bundles it into a loadable Bundle which you then can drop into unity as a plugin.

My solution is not yet complete, as I am still missing the exit code thing, but as soon as I am done, I will consider sharing more details.

Can someone who has gotten this working share some insights on how to get it going?

I’m wondering about the return 173 code issue too. Perhaps one can just call exit() or something in the Xcode Bundle plugin (not sure how Unity will react then though, if it will truly exit).

exit(173) is what you use.