I'm implementing in-app purchase in an iphone application that allows for downloading of a non-trivial amount of data.
Right now, I'm trying to figure out if the Store Kit can tell me if there are any transactions where the purchase is complete, but that have been interrupted by application shutdown.
As far as I can tell the only way to do this is to add an observer to the SKPaymentQueue:
[[SKPaymentQueue defaultQueue] addTransactionObserver:someObject];
and wait for the defaultQueue to call
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
on someObject. Items that are in the interrupted state above show up in the transactions array as SKPaymentTransactionStatePurchased when this method is
My first attempt at solving this problem was to add my observer and then ask for:
[SKPaymentQueue defaultQueue].transactions
and inspect those. This allegedly returns an array of 'pending' transactions, but in my experience doesn't include transactions that are in SKPaymentTransactionStatePurchased.
I was hoping to use the storekit to maintain this state and would love any ideas. Thank you.