How to migrate whole system that uses StoreKit 1, AppStore Notifications v1 and verifyReceipt to new versions?

Generated on 8/12/2024

1 search

To migrate your system from StoreKit 1, App Store Notifications v1, and verifyReceipt to the new versions, you should follow these steps:

  1. Update to StoreKit 2:

    • StoreKit 2 is recommended for a better in-app purchase experience. It offers improvements such as access to customer transaction history and subscription renewal info, and it uses modern Swift features like async/await. StoreKit 2 also supports back deployment, allowing you to access new features even on older OS versions. For more details, refer to the session What’s new in StoreKit and In-App Purchase.
  2. Migrate App Store Notifications:

    • Enable App Store server notifications version 2 for your app. This version provides notifications for all purchases, including renewals, which can occur when the customer is not using the app. This helps in discovering purchases without relying on the device. More information can be found in the session Explore App Store server APIs for In-App Purchase.
  3. Transition from verifyReceipt:

    • Use the App Store Server library to transition away from the deprecated verifyReceipt endpoint. This library simplifies integration with the App Store server and provides built-in signed data verification. It also allows you to extract transaction information from deprecated receipts. For more guidance, see the session Explore App Store server APIs for In-App Purchase.

By following these steps, you can ensure your app is up-to-date with the latest in-app purchase technologies and provides a seamless experience for your users.