Go to the directory with the project and run release command like:
cd ~/AppleReceiptValidator && make release
Then run executable with your parameters:
./.release/release/AppleReceiptValidatorCLI --receipt <your-receipt-base64-string> --secret <your-secret> --print-as-json true
Add to your project and you'll get a few structures to operate with Apple receipt validation service.
Run this code on a non-main queue to get the info, describing the validation result:
try Networking.requestData(
ReceiptRequest(receipt: self.receipt, password: self.secret),
functor: API.requestReceiptValidation
)
Or use more 'traditional' api call:
API.requestReceiptValidation(request: ReceiptRequest(receipt: self.receipt, password: self.secret)) { validationResult in
// do your work here
}
It only works with production environment now. Feel free to change source codes as you like to add more functionality.