Hi all, :)
I'm developing a simple epub reader on iPhone but been wondering how to go about loading it. I know reading files such as a PDF is somewhat straightforward because it's one file in itself and can be loaded using UIWebView or CoreGraphics. It's unlike ePub which requires a bit more work to get(parsing xml's ...etc) the contents since it's essentially a ZIP file.
Now the way I thought of doing it is by doing the following. But I'm not sure if it's the right way:
- Download the book.epub file to UserDomain as in this example
- Unzip book.epub file to create a book dir where all the contents will be
- From the created book dir, access the files and do the necessary(retrieve, parse.. etc).
- When the epub is unloaded or application's been closed, delete unzipped version -- the book dir
- Do the cycle from unzipping when opening the book.epub again.
Unless I can access ePub file contents directly, I guess there's no need to unzip them... which is unlikely because it's a ZIP.
Thanks in advance for any help. :)
Kind regards, oonoo