Reading raw EPUB item data in v3 #672
-
|
Hello! It's me again, working on the Storyteller iOS app this time. With v2 (and in v3 on Android), I used an onCreatePublication callback in Publication (now PublicationOpener) to add In the Swift toolkit, I'm not immediately seeing how to do this. Running into two issues:
Hoping that there's a way around this that doesn't entail forking... like all of PublicationOpener :/ Any ideas? Here's the current implementation with Readium v2, in case that's helpful! https://gitlab.com/storyteller-platform/storyteller/-/blob/main/mobile/modules/readium/ios/BookService.swift#L25-67 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I actually took a look at |
Beta Was this translation helpful? Give feedback.
-
|
There's no good reason for |
Beta Was this translation helpful? Give feedback.
container.readData()is a convenience utility used internally, it's not exposed publicly because we don't want to encourage users to ignore the typed errors returned byResource.read(). But yeah it's basically justcontainer[href]?.read().get().There's no good reason for
onCreatePublicationto be synchronous (except thatasyncfunctions were added pretty recently in the toolkit). Feel free to open a PR to makeonCreatePublicationasync 👍