4

I'm a bit stumped by this.

When restoring transactions, I receive, as expected, an NSArray of all past transactions (as SKPaymentTransactions). According to all documentation I can find on the internet, I should expect to see the SKPaymentTransaction's transactionDate property set to the time I did this restore. If I want to see the date of when the subscription was originally made, I should be looking at the originalTransaction property's transactionDate. I looked at several IAP guides and some stackoverflow posts, like this one.

In theory, my (incorrect?) understanding was:

transaction.transactionDate == Date of restore

transaction.originalTransaction.transactionDate == Date this particular subscription renewal was purchased

Is this correct?

Because what I am seeing, when testing in Sandbox, is the exact opposite. I am seeing, in practice, the following:

transaction.transactionDate == The date the transaction was renewed tarnsaction.originalTransactionDate == an older date, possibly the first time I ever purchased the subscription.

I've modified my code to work perfectly in the sandbox, but I'm concerned it will break in live if the sandbox is doing this wrong. I am using the transactionDate to determine when the subscription was purchased, and expiring 32 days later. If there's a better way to do this, I couldn't find anything in the documentation.

Community
  • 1
  • 1
Praxis
  • 95
  • 1
  • 9

0 Answers0