5

I am planning to develop a ePub reader for iOS devices. I don't want to use webView for this. In this application, I want features like iBook or stanza app. I want to know, which approch is used in developing Stanza app.

iOS Develover
  • 61
  • 1
  • 1
  • 2
  • 1
    Look at http://stackoverflow.com/questions/1388467/reading-epub-format – dusker Nov 17 '10 at 15:03
  • See this link http://stackoverflow.com/a/8969259/846372 – Soniya Feb 01 '12 at 12:03
  • i am also planning to develop ePub reader . can u please suggest me they use web view or other. Please check this i have posted question http://stackoverflow.com/questions/22929378/split-html-string-according-to-font-size-in-uiwebview?noredirect=1#comment35003225_22929378 – Kalpesh Apr 09 '14 at 06:26

4 Answers4

7

Books in ePub format are HTML with some meta-data. Different generators create differently formatted HTML. The work needed to implement a parser capable of displaying all ePub is a mammoth task! If you do not want to use a web view then your project is doomed from the start.

Stanza, Apple's iBooks, my own ePub reader for iPad, and any other ePub reader I know of all use a standard Web view as the basis. On top of that you need allot of CSS and Javascript to tweak all mutations of ePubs there is.

PeyloW
  • 36,742
  • 12
  • 80
  • 99
  • I'm curious, how can you tell a reader uses a WebView to render the ePub? – Totach Feb 27 '11 at 17:22
  • @Totach: Your best (and only?) option is to get the IPA file, and look at the contained resources, and maybe run classdump-z on the binary. – PeyloW Mar 07 '11 at 09:00
  • WebView will cause memory issues on too large of chapters. Trust me, they don't use WebViews. – Oh Danny Boy Apr 17 '12 at 14:52
  • 3
    I don't think they use WebView, I believe they use CoreText. – neevek Jun 06 '12 at 03:44
  • I don't think iBook is using WebView. It's so smooth and rendering something like Gallery which is not rendered correctly in webview. – Bagusflyer Jan 25 '17 at 22:54
2

Download Sample project from here http://ideveloperworld.blogspot.in/2011/02/epub-reader.html

Krunal
  • 6,440
  • 21
  • 91
  • 155
2

Your approach should be to learn how to parse the ePub data and bundle that with an app that displays the content as well as handles all the other features. Probably want to look at Core Text.

bbarnhart
  • 6,620
  • 1
  • 40
  • 60
2

Actually you do can write an ePub reader without an WebView, but you need to render everything on your own. You can find some open source epub reader for reference.

Ted Chien
  • 21
  • 1