skip to Main Content

My app has a subscription group with 2 levels of subscription: monthly and yearly. If the user purchases the "yearly" level, then downgrades to "monthly", the iOS dialog that pops up says that the new downgraded level will start after the current higher level finishes. That’s fine; that behavior is what Apple describes in the WWDC videos.

But how do I reflect this new situation in my View? I now have an active annual subscription and there’s a monthly view that is "scheduled" to start once the annual subscription is up for renewal. I know how to show that the annual subscription is still active but I want to show the user that there’s a monthly subscription that will start later. How do I query for this case to reflect it in my view? There are no new transactions since the monthly subscription hasn’t yet been purchased. I don’t want the user to keep pressing a "buy" button for "monthly" to downgrade and not get any feedback other than the iOS dialog.

I am not using a server of my own to manage subscriptions.

2

Answers


  1. Chosen as BEST ANSWER

    The mechanism I developed to handle subscriptions turns out to deal with upgrades and downgrades just fine. I use two detached Tasks that each have a listener function.

    The first detached task listens for transactions. Its key line is:

    for await result in Transaction.updates {
    

    It updates my local list of subscription statuses as needed.

    The second detached task listens for subscription changes like:

    for await _ in Product.SubscriptionInfo.Status.updates {
    

    and also updates the local list of subscription statuses.


  2. I think it may be a way to fetch the status from server to server notification.

    V1 Notification: DID_CHANGE_RENEWAL_PREF for downgrade; DID_CHANGE_RENEWAL_STATUS, INTERACTIVE_RENEWAL for upgrade.

    V2 Notification: DID_CHANGE_RENEWAL_PREF with subtype upgrade and downgrade

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search