-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Local Receipt Validation as recommended by Apple #101
Comments
Have there been any developments in regards to this issue? I was planning on writing a gist / small library for doing local receipt validation myself. I might contribute if there is still a need for this. |
I don't expect to have time to implement this unfortunately. Recently we have introduced a @Kymer If you are planning to write this yourself, I would advise to create a new class that conforms to the |
Closed linked issue as duplicate: #75 |
Hello, is there a way to clear all data associated with the in app purchase on a device? In particular, can we erase the "localReceiptData"? I see this is a read only property. |
Yes, can you please make I'm experiencing issues with testing my receipt when running my macOS from Xcode because it doesn't have a receipt. I have to read I need the receipt to be able to read Thanks! |
@hanming223 But the author said he has no time to implement local receipt validation. |
Hey, |
Hi, Here is the lib: https://github.com/tikhop/TPInAppReceipt Personally, I use If it's really an issue, we can try to combine both projects. P. |
Hi @tikhop, is there a demo available using your |
@teologov they are kind of independent. That's how I check a subscription:
What's missing here is the logic to load from the Apple server if expired. |
@nuthinking I tried to conform to |
@bizz84 it is not enhancement. It is a bug |
As recommended by Apple, local receipt validation can be performed with a number of steps:
To validate the receipt, perform the following tests, in order:
Locate the receipt.
If no receipt is present, validation fails.
Verify that the receipt is properly signed by Apple.
If it is not signed by Apple, validation fails.
Verify that the bundle identifier in the receipt matches a hard-coded constant containing the CFBundleIdentifier value you expect in the Info.plist file.
If they do not match, validation fails.
Verify that the version identifier string in the receipt matches a hard-coded constant containing the CFBundleShortVersionString value you expect in the Info.plist file.
If they do not match, validation fails.
Compute the hash of the GUID as described in Compute the Hash of the GUID.
If the result does not match the hash in the receipt, validation fails.
If all of the tests pass, validation passes.
A discussion on how this has been implemented by RMStore is here:
http://stackoverflow.com/questions/19943183/a-complete-solution-to-locally-validate-an-in-app-receipts-and-bundle-receipts-o
Also this series was recently published with some guidelines on how to implement local receipt validation. This links to the SwiftyLocalReceiptValidator project on GitHub, which you can already use independently of SwiftyStoreKit.
Ongoing discussion about how SwiftyStoreKit and SwiftyLocalReceiptValidator may fit together:
andrewcbancroft/SwiftyLocalReceiptValidator#1
The text was updated successfully, but these errors were encountered: