SKDownload.progress stops at 0.80

I have ported an iPhone/iPad app to macOS using Catalyst.

The existing iPhone/iPad app contains non-consumable in-app purchases, which have been tested and are live in production. No complaints from iPhone/iPad users.

I'm having trouble testing hosted content on the macOS version. When I try to download a hosted IAP, the progress continues up to 80%, at which point it stops. If I launch the app from the command line, I can see an error message as "The installation could not be started" and, looking at the path of the downloaded archive, it looks complete. So, if I can trust the log from running from the command line, I suspect there may be some permissions issue in testing macOS hosted content downloads.

Here is my current workflow,
  1. sign out of App Store and iCloud on my development machine.

  2. clean build folder and build for "Any Mac" (though I've also tried "My Mac" with no difference; build scheme checks all boxes: analyze, test, run, profile, archive).

  3. find build in the "Products" folder in the left rail. click on "Show in Finder".

  4. Launch from Finder.

  5. Purchase IAP using sandbox account (tested with an older account used for the iPhone/iPad testing and a new one created after I started testing the macOS version; the "Environment: Sandbox" text appears when I make the purchase).

  6. Download starts and goes up to 80%, at which point the SKDownload.state is .failed.

Other notes,
  • I also uploaded a macOS build to App Store in the process, though I obviously have not released it.

  • XCode Version 12.2 (12B45b)

  • macOS 10.15.7 (19H2)

It looks like there have been previous issues like this, though without clear steps to resolution.

Any help would be appreciated.

Thanks.


Answered by monokakido in 660828022
This issue has been resolved in macOS Big Sur 11.3 beta (20E5172i).
Downloaded content will be unzipped in /Library/Application Support/AppStoreContent/BUNDLEID/Products/PRODUCTID/.

I'm having the same problem with my Mac Catalyst app.

I observed the temporary directory of "appstoreagent".
path: /private/var/folders/.../com.apple.appstoreagent/com.apple.appstore/

SKDownload was downloading the zipped file correctly into the temporary directory.
filename: mzafbenc.1800XXXXXXXXXXX.zip

However, the zip file was deleted without unzip.

It is happened on both Intel and M1 macs.
We are having the same problem with our iOS game that uses StoreKit hosted downloads, when running on an M1 Mac. The download starts and gives progress updates as normal, but once it gets to 0.8 (which means the file is fully downloaded), there's nothing further. We would expect to see SKDownloadState.Finished, where we can then get the file and deal with it; but that state does not occur at all.
Accepted Answer
This issue has been resolved in macOS Big Sur 11.3 beta (20E5172i).
Downloaded content will be unzipped in /Library/Application Support/AppStoreContent/BUNDLEID/Products/PRODUCTID/.

SKDownload.progress stops at 0.80
 
 
Q