Using an HTTP server has many downsides:
- error-prone
- more complicated to setup
- third-party dependencies
- unsafe (any other app on the device can access the publication resources)
WKURLSchemeHandler could be a solution to serve EPUB resources directly. Looking at the API, it seems promising even for byte range requests.
However, it is available only on iOS 11+. So we still need to support HTTP servers as an alternative until we drop support for iOS 10.
Related issue for Kotlin: https://github.com/readium/r2-testapp-kotlin/issues/297