I’m trying to build a Mac desktop version of our iPad app, but I’m running into issues implementing in-app purchase and receipt verification. Is this possible with Unity and has anybody done it? To clarify, I’m not just trying to submit my app to the Mac App Store, but I need IAP and receipt verification.
I’ve built a plugin for Unity to handle the IAP and receipts (in Xcode), but because the app is not being built and run from Xcode, it does not appear to be entering sandbox mode. The only information on this that I can find in the docs is “Test During the Development Process”:
http://developer.apple.com/library/mac/#releasenotes/General/ValidateAppStoreReceipt/_index.html
It suggest that the app should exit with code 173 when the receipt file isn’t found and that the sandbox receipt will automatically be downloaded. It should be in the app in “Contents/_MASReceipt/receipt”. I’m doing exactly this with my bundle using exit(173). The app exits, but no receipt is downloaded.
Since I’ve been unable to get my app to connect to the sandbox, I thought I’d try using a sample receipt, but the little instruction I’ve found doesn’t work. In any case, I think I need a real receipt to work with.
Also, in case anybody asks I have done the usual required steps for submitting the app to the Mac App Store, updating the Info.plist, icons and running codesign and productbuild.
TL;DR - How do you retrieve the app receipt for a Unity mac desktop app during development?