Mac App Store - Receipt Validation Plugin - Enjoy :-)

We (Sector3) have decided to release a binary version of our receipt validation plugin for the Mac App Store to the community.

It’s for Unity Pro users only and it’s very basic and very easy to use.

  1. Unzip the attachment into your plugins folder
  2. Use the following line of code in your game in the Awake() function of the first script that runs.
ReceiptVerifier.ValidateReceiptInsideBundle();

And that’s it.

The plugin will check for a valid receipt for the app and if it doesn’t find one, BANG… it exits the app with a code 173.

As I said above, it’s very basic and does all that is needed to validate an App.

We hope everyone finds it useful :slight_smile:

491266–17269–$ReceiptVerifier.zip (17.1 KB)

Mega awesome, thanks a lot for sharing!

Let’s all pitch in and buy Seon a case of his national beverage.

Thank’s Seon!

Thanks!

No need for thanks… we are happy to help other community members out. Sorry we didn’t post it earlier.

Is it supposed to go BANG on the Editor too? :slight_smile:

Yes it will if you are not familiar with how to code around editor usage… try

#if !UNITY_EDITOR
     ReceiptVerifier.ValidateReceiptInsideBundle();
#endif

Yes, I figured it out. I didn’t know if it worked or crashed the first time. :slight_smile:
But I tried to run the app after building and it quit and showed me the login screen… so it definitely works.

Waiting for review now… thanks again!

Glad you got it integrated and have your game submitted!

Thank you !!!

QUESTION… What is the code you exit with?
Doesn’t apple say that you are not allowed to quit an app via code but that the only way to end an app is to launch another one in it’s place or to press the Home button? Haven’t been keeping up to date so this might have changed, but isn’t that the case?

or are you working on the principle that Apple will never know because they will be running the valid copy and those who aren’t won’t be able to complain about it? :stuck_out_tongue:

Home button? I am confused. This is for OSX Apps on the Mac App Store.

Apple’s requirement is that your Mac application exits with a 173 code, which 10.6.6 understands as a call to prompt the Mac App Store login prompt.

My bad… sorry, confused there. I saw “App” and read it as “iPhone”…
My bad :slight_smile:
Thanks for clearing that up :slight_smile:

Does one need this for Mac App Store apps? (Sorry i don’t know much about it ;))

Only if you want Apple’s DRM. It’s not a requirement.

Thanks a lot for saving me a few hours today Seon!

Important note: Don’t move the ReceiptVerifierBundle.bundle in a subfolder within the Plugins folder, won’t work then!

Just in case anyone else got a rejection mail from Apple like this:

It is because the plugin is compiled as fat plugin supporting multiple architectures and Apple seems suddenly to only allow x64 and i386 architectures anymore also for the plugins. Seon would need to recompile his plugin and post it here. I just wanted to post this if others stumble too upon this rejection and wondered what is going on. A few weeks ago it was possible to submit with Seons version above. Weird.

You can check that with the lipo command:

That is my game bundle:

Hard Rock Racing.app/Contents/Plugins/ReceiptVerifierBundle.bundle/Contents/MacOS

lipo -info ReceiptVerifierBundle
Architectures in the fat file: ReceiptVerifierBundle are: x86_64 i386 ppc7400

That ppc is the one Apple mourns about.

Seems bit like supporting a 486 if we’re going to support powerpc still :stuck_out_tongue:

Maybe this helps until we get a new version from Seon: http://www.hartcw.com/francis/2011/05/01/using-ditto-to-strip-mac-app-bundles/

Just strip the PPC code out of the bundle.