0
votes

We are currently developing an app which has In App Purchased - Hosted Content with Apple, the app works well and users can make a purchase of the content and the app downloads it OK.

However we have since started developing the restore purchases button in the app, and we cannot seem to figure out how we can request the list of purchases from apple using

restoreCompletedTransactions

Currently when we request this store kit is invoking the delegate method

- (void)paymentQueue:(SKPaymentQueue *)queue updatedDownloads:(NSArray *)downloads
{

And the downloads are starting automatically ideally we would like to receive a list of available downloads for the user as part of the restore and present them with a screen to select which files they want to download and then we kick off the download of the content.

Apple Guidelines state this but I cannot seem to find any examples:

Apps with more than a few products, especially products with associated content, let the user select which products to restore instead of restoring everything all at once. These apps keep track of which completed transactions need to be processed as they’re restored and which transactions can be ignored by finishing them immediately.

Thanks Aaron

1

1 Answers

1
votes

When the transactions come through, you get a list of downloads to perform. It sounds like you're conflating the need to preflight downloads with a perceived need to preflight transactions; as I understand it, this is not the case. Let all the transactions come through, collect the downloads, then give a UI interstitial to pick and choose which ones to initiate the download for.

You control when those downloads start via something similar to [[SKPaymentQueue defaultQueue] startDownloads:originalTransaction.downloads]; .

For more info: https://developer.apple.com/library/mac/documentation/StoreKit/Reference/SKDownload_Ref/index.html#//apple_ref/occ/cl/SKDownload