These kind of receipts are not being validated through the Apple verification server and are being validated locally.
Note: we don't validate local receipts with StoreKit certificate at the moment (you can test without them, everything works fine). The certificate is required for testing automation scenarios, this will be added later.
Let's discuss more closely.
StoreKit Configuration File
In Xcode 12 you can create a StoreKit Configuration File in order to create and test in-app purchases without having to create them in App Store Connect.
This is basically a JSON-encoded file that describes a struct of your test in-app purchases. Product Identifiers doesn't have to be the same as in App Store Connect, however, we recommend creating exactly the same to avoid possible bugs in your logic.
Adding in-app purchases is pretty straightforward. You can easily create and update introductory offers or promotional offers.
Once product identifiers set up, you will need to include the given configuration file to the build scheme.
Go to Product > Scheme > Edit Scheme and in Run/Debug tab under Options choose your StoreKit configuration file.
With the StoreKit Configuration file set up, you can make purchases in Simulator as usual by calling
After the purchase is completed, a receipt is sent to Apphud servers and decoded locally. No HTTP request is sent to Apple, a receipt is being decoded as PKCS#7 container.
Apphud now finally supports receipts made using Local StoreKit. No need to update SDK, everything is done on our backend.
However, there are some limitations mentioned below.
ApphudSubscriptonmodel with regular status in response. But don't worry, that is only LocalStoreKit's receipt issue, everything will work fine in production!
pending_renewal_info, a special sub-JSON, which contains important fields about the state of subscriptions, like autorenewal state, in billing retry state, etc. Subscriptions generated from local receipts will always have
To summarize, in this article we covered how you can easily test your In-App Purchases in Simulator using Apphud SDK thanks to Local StoreKit from Apple. Hope you will like this feature and debugging process become simpler. Have a great day!