iOS StoreKit 2 - How can an app be notified when a pending purchase occurs?

3 weeks ago 20
ARTICLE AD BOX

I'm developing an iOS app using the StoreKit 2 API,
and I'm trying to handle pending purchases as described below.

Let's presume that the app is installed in devices A and B in the same family sharing group.
Let's also presume that a user makes a purchase via the app of device A.

In device A, the app can be notified that the purchase is pending (onInAppPurchaseCompletion).
But in device B, how can the app be notified that there is this pending purchase ?

As usual, the app has listeners for Transaction.updates and SubscriptionStatus.updates,
but these listeners never seem to be triggered when a pending purchase occurs.

When there is a pending purchase, the aim is to disable the app paywall of device A and B,
to prevent purchases from being redundant or incompatible (e.g. subscription vs lifetime).

Read Entire Article