views:

30

answers:

1

My application is somehowe a library, represented by a UITableView, each row displays three book icons, pressing on any icon would cause the app to navigate to a scrollview that scrolls between the book pages. Each book is represented in the resources directory by two things :

1- a .plist file, eg : Book1.plist

2- a folder containing images ( each one corresponds to a book page )

I want to allow the user to buy new books, so if he wants to buy a certain book, what happens is that the new book's "plist file" & "images folder" are downloaded to the application, and then the book is automatically displayed in the UITableView (I have done this last part, which is : adding a new plist file to the app would update the UITableView with a new book icon).

SO how can this downloading thing be achieved ? I think that the user, when clicking on the "download new book" button, should navigate to apple store webpage which contains the books that should be downloaded right ? Then buying a book would directly download the "plist file" & "images folder" to the application, but how can this be done ?

Please can anyone offer a detailed help, and thanks in advance

A: 

You probably want In-App purchase, with a few caveats:

  • In-App purchase is entirely in-app. There is no "apple store webpage" (do you mean "App Store"?); you do the UI yourself, and then ask StoreKit to authorize the transaction
  • The App Store does not store extra content for you. Either you bundle the books with the app (i.e. the "purchase" unlocks content that has already been downloaded), or you use your own server (or Google App Engine, Amazon EC2/S3/CloudFrount/whatever) to serve the content.

EDIT:

  • The only way to add bundled books is to release an update. This generally involves a 1-2 week delay and is prohibitive if your books are big.
  • It's entirely trivial to rename .ipa to .zip and unzip to get the resources (the binary is encrypted but the resources aren't), so you might want to add encryption (encryption for DRM-like purposes doesn't require CCATS classificaton/exception/whatever).
  • Writing a webserver is out of the scope of this answer. An easy way is to just stick static content in a hidden directory on a server somewhere; the "proper" way is to have the app send the App Store transaction receipt to the server, verify it on the server, and deliver the content only if verification passes. I'm not sure if there's open-source code or a proprietary service which lets you do this without writing your own code.
tc.
In case I want to bundle the books with the app, I should in this case create all the books in advance, and later on there would be no way to add other books right ?And can you please explain more the second option, about having my own server ? is there any link which explains this point ?
SLA