问题
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;
}
}
}
Its never reaching "SKDownloadStateFinished"
Has any one faced similar issue. if yes, what's the resolution?
回答1:
It wont work on simulator. The same code works perfect on Device.
回答2:
Well, looks like after all it's not supported:
http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/
"
Simulator
For this release, iOS Simulator does not support testing In-App Purchase. Please use a device to test your apps that use this feature.
"
And it's still not supported on 6.1:
http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_1/
来源:https://stackoverflow.com/questions/14080791/ios-downloading-from-apple-server-after-inapp-purchase