I have an app which has auto renewable subscriptions, the purchasing of these are fine, however if a user deletes the app and attempts to restore the subscriptions at a later date I'm not getting back the data that'd expect.
According to apple docs, I should recieve an originalTranscation with the details of the initial transaction, in most cases and on the sandbox this is exactly what is happening however on some of our customers live apps we are receiving a nil value for the originalTransaction.
Can anyone think why I would not receive the originalTransaction back? The date sent back in [transaction transactionDate] is the same as I'd expect from [[transaction originalTransaction] transactionDate] however I don't know whether it's safe to assume that if the originalTransaction is nil that the [transaction transactionDate] will always be the date of the originalTransaction.
I was having exact same issue. I resolved it by checking if original transaction is nil return the current transaction.
here is the code i replaced in - (void)restoreTransaction:(SKPaymentTransaction *)transaction
if (transaction.originalTransaction.payment.productIdentifier) {
[self provideContentForProductIdentifier:transaction.originalTransaction.payment.productIdentifier];
} else {
[self provideContentForProductIdentifier:transaction.payment.productIdentifier];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With