views:

252

answers:

1

Hello experts!

I have created an app which allows users to buy non-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

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