InAppPurchases::Download questions

I’m having trouble figuring out how to force download of In App Purchases on iOS. The Listener seems to capture productDownload* callbacks on its own, but it doesn’t seem fully reliable, so I would like to add a function to Restore Purchases.

I see the framework offers a startDownloads() method but it requires an Array of Download struct. This is also abstract.

Could you explain how this is supposed to be used?

Thanks a lot.



Yes, that calls the purchasesListRestored() callback with information about the product(s) purchased in the form of an array of PurchaseInfo. This structure contains an array of Download struct. That much seems to work fine at my end.

But this doesn’t automatically trigger the downloads themselves. You need to call the startDownloads method with an array of Downloads for that to start.

It’s also quite unreliable, because when you restart the app, it seems that iOS resumes any pending downloads.

So it would help to have the correct steps on how to implement downloads in a proper way, which was not included in the IAP tutorial.