readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
385 stars 164 forks source link

Adds HTTP caching headers to responses in iOS RDServices #236

Closed olivierkorner closed 8 years ago

olivierkorner commented 8 years ago

it should provide a 10-30% speed boost to page rendering.

Supersedes https://github.com/readium/readium-sdk/pull/235

danielweck commented 8 years ago

LGTM = Looks Good To Me, and Let's Get This Merged :) (see discussion thread in https://github.com/readium/readium-sdk/pull/235 )

rkwright commented 8 years ago

@danielweck LOL! @olivierkorner Many thanks!

danielweck commented 8 years ago

Android: https://github.com/readium/SDKLauncher-Android/issues/92

OSX: https://github.com/readium/SDKLauncher-OSX/issues/47

msintov commented 8 years ago

Is there a corollary commit to the SDKLauncher-iOS repo that adds NSDate+RDDateAsString.h and NSDate+RDDateAsString.m to the Xcode project file?

rkwright commented 8 years ago

Uh-oh. I just cloned SDKLauncher-iOS into a new sandbox from develop and did a clean, then a build to run it on my iPhone (5). When I try to open Alice3.epub, I get:

2016-04-29 14:09:51.727 SDKLauncher-iOS[2043:948150] -[__NSDate dateAsString]: unrecognized selector sent to instance 0x14e71c920
2016-04-29 14:09:51.731 SDKLauncher-iOS[2043:948150] *** Terminating app due to uncaught   exception 'NSInvalidArgumentException', reason: '-[__NSDate dateAsString]: unrecognized selector   sent to instance 0x14e71c920'
*** First throw call stack:
(0x180acee38 0x180133f80 0x180ad5ccc 0x180ad2c74 0x1809d0d1c 0x100069124 0x10005b0e4    0x100057ea4 0x100056eb4 0x10005bfb8 0x1000d1324 0x1004a5a7c 0x1004a5a3c 0x1004b2554   0x1004a972c 0x1004b466c 0x1004b4364 0x180731470 0x180731020)
libc++abi.dylib: terminating with uncaught exception of type NSException

I get this with any EPUB I try. Suggestions?

msintov commented 8 years ago

I submitted a pull request to fix this (hopefully I made the pull request correctly): https://github.com/readium/SDKLauncher-iOS/pull/77

msintov commented 8 years ago

Re-fixed with this pull request: https://github.com/readium/SDKLauncher-iOS/pull/78

olivierkorner commented 8 years ago

Yes indeed, I forgot you have to add the NSDate category files to the SDKLauncher-iOS XCode project, sorry. The files are in the readium-sdk repo, but you have to modify the project file of the launcher repo... Thank you, Michelle!