Skip to content

SergeyPetrachkov/AppleReceiptValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published