iOS - 在购买苹果服务器后从Apple服务器下载 [英] iOS - Downloading from Apple server after inapp purchase

查看:376
本文介绍了iOS - 在购买苹果服务器后从Apple服务器下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS6中,我们有新功能将内容放置在Apple服务器上,以便在成功购买后可以下载内容并正确使用该内容。

我可以成功进行购买,当下载内容时,它停止在75%。
我尝试使用不同的购买和不同的内容放在苹果服务器上。但是它停止在75%...不知道为什么。
我正在使用以下代理方法来跟踪下载进度:

In iOS6, we have new feature to place the content on Apple Server so that after successful purchase, the content can be downloaded and use it appropriately.
I'm able to make the purchase successfully and when downloading the content, it stops at 75%.
I tried with different purchases and different content placed on apple server. but it stops at 75%... dont know why. I'm using the following delegate method to track the download progress:

-(void)paymentQueue:(SKPaymentQueue *)queue updatedDownloads:(NSArray *)downloads
{
    for (SKDownload *download in downloads)
    {
        switch (download.downloadState) {
            case SKDownloadStateActive:
                NSLog(@"Download progress = %f and Download time: %f", download.progress, download.timeRemaining);
                break;
            case SKDownloadStateFinished:
                NSLog(@"%@",download.contentURL);
                break;
            default:
                break;
        }
    }
}

它从未达到SKDownloadStateFinished

有任何人面临类似的问题。如果是,分辨率是多少?

Its never reaching "SKDownloadStateFinished"
Has any one faced similar issue. if yes, what's the resolution?

推荐答案

它不适用于模拟器。相同的代码在设备上完美无缺。

It wont work on simulator. The same code works perfect on Device.

这篇关于iOS - 在购买苹果服务器后从Apple服务器下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆