Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Generating a Sandbox Receipt to Test Validation

pmhart83pmhart83 USMember ✭✭✭

It has been an up hill battle trying to find a solution for the OSX App Store Receipt validation required to get into the app store. The binding I worked on would compile but we still got rejected because it apparently didn't actually work.

Does anyone know how I can create a sandbox receipt so that I can test my validation code before sending it off to Apple?

I read here:

That if you launch the app from Finder and not Xcode (or for us Xamain) that it should create a receipt you can try to validate. I did try this but it did not create a receipt file.

Anyone know how to do this with Xamarin?


  • JohnConnersJohnConners GBMember ✭✭

    Once built and appropriately signed with the app store certificates, you need to run your app from the Applications folder and launch it in Finder for it to attempt verification with the app store. So if your receipt validation code returns an exit code of 173 (since there will be no receipt first time you run) then OS X will automatically ask you to authenticate with the app store, however note that it'll ask you for a sandbox app store login, which you can create from iTunes Connect. Once signed in it'll automatically download a receipt, copy it into the app bundle and re-launch where your verification code will run again and should pass. Then each time you launch you've got a receipt in the bundle. But all this only happens if you're running from Applications and the app store certificates were used to sign the app.

  • pmhart83pmhart83 USMember ✭✭✭


    Did you use a Obj-C binding or write the validation in Xamarin?

    I did figure out how to make a Xamarin.Mac binding if there is code you know works.

  • JohnConnersJohnConners GBMember ✭✭

    I wrote the receipt validation code in C# @pmhart83 since it seemed equally trivial for a hacker to circumvent as the code calling it will be in C# either way. My app is on the Mac App Store so it does appear to work. Let me know if you can't get your implementation to work (once you confirm the sandbox MAS does actually drop a receipt into your app bundle) and I can always send you mine.

Sign In or Register to comment.