I am currently working on an app which allows users to purchase downloadable content by Hosted by Apple, so far my code works in terms of the user can purchase and the download completes OK and the file is intact.
However I want to display to the user the progress of the download as some of the files are quite large but I am finding that the SKDownload.progress runs to around 60% or 80% and then suddenly stops.
In my code I am doing the following:
- (void)paymentQueue:(SKPaymentQueue *)queue updatedDownloads:(NSArray *)downloads
{
for (SKDownload* download in downloads)
{
switch (download.downloadState)
{
// The content is being downloaded. Let's provide a download progress to the user
case SKDownloadStateActive:
{
self.status = IAPDownloadInProgress;
self.purchasedID = download.transaction.payment.productIdentifier;
self.downloadProgress = download.progress*100;
NSLog(@"progress: %f", download.progress);
NSLog(@"%f remaining", download.timeRemaining);
[[NSNotificationCenter defaultCenter] postNotificationName:IAPPurchaseNotification object:self];
}
break;
But when I check the logs it shows the progress but stops here:
2015-02-23 18:59:20.122 AppName[1514:224651] progress: 0.800000
2015-02-23 18:59:20.123 AppName[1514:224651] 0.715862 remaining
I'm also showing a progress label to the user and from a user perspective when watching the download you would think its actually not downloaded when the last figure you see is 60 or 80%
Has anyone got any tips on this or is it perhaps a bug?
Thanks Aaron