Subscription up/downgrade flow for iOS

I am using Unity version 2021.3.9f1 and IAP Package version 4.4.1
I have two subscriptions (grouped), monthly and yearly option.
My problem regards the iOS flow. When a user purchases for the the first time either monthly or yearly, the purchase flow is as usual and the:

public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)

is called as expected.
But if the user upgrades or downgrades between them, ProcessPurchase is never called.

I have solved this issue for android using:

builder.Configure<IGooglePlayConfiguration>().SetDeferredProrationUpgradeDowngradeSubscriptionListener(NotifyUserOfOnDeferredSubscriptionChange);

Which is the Unity IAP flow for iOS up/downgrade?

Great question! I would recommend that you take a look this sample listed for IAP in Package Manager, “Apple App Store - 12 Upgrading and Downgrading Subscriptions”. We are planning to add additional support for subscriptions and other new features as we adopt StoreKit2 hopefully later this year and early next year.

Hi Jeff, thanks for your reply. Yes I did checked it and I am aligned to it.
After some testing I noticed that the flow is as expected, but it takes so long time (after up/downgrade) to hit the ProcessPurchase function.
At my 1st try, it took >20sec
At the 2nd one I waited for 2minutes in app. I put the app at background and back to foreground and never hit. I killed the app and then I got a hit (at the new instance).

Note that I am on sandbox environment.
Do you have any idea if this is the expected behaviour or that in production mode this problem is solved?

Unsure. We are a pass-through service for the Apple StoreKit API, so one would hope that it’s faster in production.

1 Like

I have similar issues with IOS. There are some update?. I am using IAP 4.11.0. In sandbox, when I downgrade or upgrade it takes a lot of time recognize the new subscription.
Using the example provided from asset store, the method “m_SubscriptionGroup.CurrentSubscriptionId()” return the old subscription. After arround 2 min, it catch the new subscription.
Sometimes return a empty receip, but after finish the transaction.
Also tested in production, the same behavior.