开发者

Save downloaded content when in app purchase is complete

I have created an app which allows users to buy n开发者_如何学Con-consumable content. The retrieving-ids-payment-process works like a charm. What i can't really figure out is how my content should be saved into the phone. The existing structure is that I have all my current content in Resources/packages/. For every package there is an matching entry in a package.plist.

When the purchase is complete it is time to download the content from the server. What i retrieve from the server is a zip file with the new package that I have bought. My observer will call a method named provideContent:

-(void) provideContent: (NSString*) productIdentifier {
In here I will call my server and download the package
}

What i need from you guys is some sort of step by step walkthrough or tutorial of how, when the zip is retrieved(is zip allowed?), unpack this zip and add it to my current package structure.

Thank you in advance


  • Download the file. The obvious option would be just using NSURLRequest.
  • Use libz to decompress the file. See Unzip file on iPhone
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜