Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.02 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.02 KB

Apple Receipt Validator

How to use CLI:

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

How to use this as a package:

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
}

P.S.

It only works with production environment now. Feel free to change source codes as you like to add more functionality.