(StoreKit) Unfinished transactions not coming to observer on application launch (macOS)

Originator:dev
Number:rdar://50132756 Date Originated:23.04.2019
Status:Open Resolved:
Product:StoreKit (macOS) Product Version:
Classification: Reproducible:Always
 
Summary:
We can't rely on StoreKit payment queue to deliver unfinished transactions to handle interrupted purchase scenarios on the mac (as described in 
https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html#//apple_ref/doc/uid/TP40008267-CH5-SW4). Note that everything seems fine on iOS in this regard.

Date and time when issue occurred: 23.04.2019 18:26:00 +0300

Steps to Reproduce:
1. Set a breakpoint in transaction queue observer’s paymentQueue:updatedTransactions: method right before processing and finishing the transaction.
2. Initiate a purchase and confirm it via series of system popups.
3. Once the app reaches the breakpoint, return immediately using "thread return" command in LLDB.
4. Terminate and relaunch your app.

Expected Results:
StoreKit calls the paymentQueue:updatedTransactions: method again shortly after launch with unfinished transaction with state == SKPaymentTransactionStatePurchased.

Actual Results:
Unfinished transaction never comes to transaction queue observer’s paymentQueue:updatedTransactions: method (at least immediately after next launch).

Version/Build:
Purchases were tested in sandbox environment.

Configuration:
iMac15,1 macOS 10.14.4 (18E226)
Xcode Version 10.2.1 (10E1001)

Comments

Issue also occurs on iOS 13+

I noticed the same issue happens in our iOS application.

updatedTransaction does not get called on application launch when there are unfinished transactions.

This issue does not appear on iOS 12. Hoping for a fix soon as we need to call RestoreTransaction on application launch as a workaround for the time being.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!