Non-renewable in-app purchase with iCloud recovery

I am creating an application in which I have an in-app purchase function. I am using a non-renewable type of subscription, but I must provide support for restoring a subscription on multiple devices.

After going through several documents, I found out that iCloud was the best way to implement it and provide subscribed content for multiple user devices. Finally, I decided that the following project would be implemented:

  • User explores the application.
  • Click on the in-app purchase button
  • Check iCloud Availability

    • ICloud Available:

      • Continue the purchase as usual.
    • iCloud is not available:

      • Show alert: "Sign in to iCloud to access signed content on another device," with the options "OK" and "Continue Anyway"

        • Click OK:

          • Remains on the same page
        • Click Continue Anyway:

          • Purchase in progress
          • If iCloud is already purchased and available, upgrade to iCloud
  • On a successful purchase, we receive a transaction. We will store this receipt in iCloud (one time in iCloud at the time of purchase) using the key value storage, as well as the default for users

  • Successful purchase.

  • The user starts the application from another device

  • Check receipt of a transaction in user defaults. If available, check and act accordingly.
  • If the receipt is not available to users by default, check for iCloud

    • iCloud:

      • ,
      • , . ,
      • , .
    • iCloud :

      • : ", iCloud, , " ""
      • " HD",

:

  • iCloud

, , , iCloud , , //. .

, , . , .

+3
1

, iCloud NSUbiquitousKeyValueStore ( , NSUserDefaults), IAP. Github, MKiCloudSync, , .

NSUbiquitousKeyValueStore, , iCloud iDevices. , - 2 , 1 iCloud, 2 , 2.

0

All Articles