My macOS app was rejected for not checking for the existence of a purchase receipt, "which can prevent In-App Purchases from being correctly processed."
They recommend implementing receipt validation to resolve this issue, going on to say that at a minimum, the app will need to check for the existence of an App Store receipt and exit at launch with a status of 173 if it does not exist.
I've followed the documentation link provided - but, other than getting a headache, I'm still none the wiser.
I tried doing the bare minimum (checking that the receipt exists, and exiting with 173 if it doesn't), but that didn't work - my app was still rejected. I suspect that this is because I'm only checking to see if a receipt is present for the App itself - I'm not validating purchases that have been made (all consumables).
The next thing I tried was experimenting with the work of others - standing on the shoulders of giants - https://github.com/roddi/ValidateStoreReceipt
This doesn't work either - because openssl is deprecated, and even installing it with brew and symbolically linking to /usr/local/include/openssl didn't help at all.
I'm including:
#import <IOKit/IOKitLib.h>
#import <Foundation/Foundation.h>
#import <Security/Security.h>
#include <openssl/pkcs7.h>
#include <openssl/objects.h>
#include <openssl/sha.h>
#include <openssl/x509.h>
#include <openssl/err.h>
But I'm still getting the error "'openssl/pkcs7.h' file not found"
Does anyone know how to do this using Xcode 8.2 on Sierra?