SKPaymentTransaction.restored VS paymentQueueRestoreCompletedTransactionsFinished

So, I have both 'SKPaymentTransaction.restored' (we'll refer to this as Restored) and the function 'paymentQueueRestoreCompletedTransactionsFinished' (we'll refer to this as theFunction for simplicity) in my app that uses Auto-Renew Suscriptions. Now, to my understanding theFunction is called when you're signed into an AppleID that hasn't suscribed to your app and you hit "Restore purchases' and Restored runs when it's the opposite. My question is this. Is that correct? If I am correct, can I use this to display an alert stating that they haven't susribed before? How do you display to the customer that they haven't suscribed before?

Replies

After a call to restoreCompletedTransactions you will get a call back to updatedTransactions with "Restored" for each purchase of the autorenewable subscription (e.g. original purchase and every month it was renewed or, if there was no purchase, no calls to updatedTransactions). After those calls (if any) you will get a call to theFunction (or to the failed function if there was a problem restoring the transactions - like the user failed to enter the correct password). You always get a call to theFunction (or the failed function) whether or not there are transactions to complete.


> can I use this to display an alert stating that they haven't susribed before?


Yes


>How do you display to the customer that they haven't suscribed before?


Use a UIAlertController with something like: "I am sorry but the App Store has no record of a purchase of an autorenewable subscription under your iTunes Account. Please tap "subscribe" if you wish to purchase an autorenewable subscription. If you feel you have gotten this message in error, use the Contact Us button and send a copy of your original iTunes receipt dicumenting your subscription."