readium / r2-lcp-swift Goto Github PK
View Code? Open in Web Editor NEWSwift LCP module
License: BSD 3-Clause "New" or "Revised" License
Swift LCP module
License: BSD 3-Clause "New" or "Revised" License
The provided LCPAuthenticationDialog
doesn't work well when dark mode is enabled.
creating this issue as a reminder for myself
There is an additional project (r2-lcp-wrapper-swift) containing the Objective-C++ / Swift wrapper around the liblcp static lib.
We should be able to put this wrapper directly into r2-lcp-swift to simplify the repos and align with the Kotlin implementation (which doesn't rely on r2-lcp-wrapper-kotlin)
Currently, if the device is offline (e.g. plane mode), there is a timeout before the ebook is opened.
The detection of the offline state should be better, via the iOS API.
steps:
Hi!
I am trying out the PDF feature in readium and am not getting it to work. I've successfully imported the publication and get the extension .lcpdf
in the suggestedFilename.
I've tried with both an epub-license and a pdf license. It works with the EPUB publication, but when opening the pdf-ebook it never stops loading. I don't see any error message in the console log.
do {
print("LOCATION TYPE:", location.type, " - path: ", location.absolutePath)
guard let (pubBox, parsingCallback) = try Publication.parse(at: URL(fileURLWithPath: location.absolutePath)) else {
return completion(nil)
}
let (publication, container ) = pubBox
let customIdentifier = NSURL(fileURLWithPath: location.absolutePath).deletingPathExtension?.lastPathComponent
publication.metadata.otherMetadata["id"] = customIdentifier
self.items[customIdentifier!] = (container, parsingCallback)
try self.publicationServer!.add(publication, with: container)
completion(publication)
} catch {
...
}
App's Cartfile.resolved
:
github "cezheng/Fuzi" "3.1.1"
github "dexman/Minizip" "1.4.0"
github "edrlab/GCDWebServer" "3.6.2"
github "jdg/MBProgressHUD" "1.1.0"
github "krzyzanowskim/CryptoSwift" "1.2.0"
github "onevcat/Kingfisher" "5.9.0"
github "readium/r2-navigator-swift" "1.2.6"
github "readium/r2-shared-swift" "1.4.3"
github "readium/r2-streamer-swift" "1.2.5"
github "readium/readium-opds-swift" "1.2.3"
github "stephencelis/SQLite.swift" "0.12.2"
github "weichsel/ZIPFoundation" "0.9.9"
Using r2-lcp-swift
(1.2.3
) with a test liblcp.
DM me (Christopher N) on slack and I'll share the lcpl license I am using :)
Currently, to import a publication from a LCPL license (using LCPService.importPublication()
), the reading app must have the passphrase. Otherwise, the download is discarded.
This prevents from "pre-loading" a publication on the device to be opened later by the user.
I suggest not checking the license in LCPService.importPublication()
, and instead just download the package and insert the license in it.
When loading a specific EPUB file (ask me the file epub31-makes-iostestapp-crash.epub) the app crashed.
Note: the file may be corrupted (comes from an export from another reading system), but it's still a good test file for what follows.
After restart, the file is not present in the catalog. When trying to load this file again, I've got the message "File already exists".
Remove and reinstall the app. import ok, ask passphrase ok, the app starts opening the file -> crash again.
//[...]
"rights":{
"print":100,
"copy":2048,
"start":"2017-08-30T03:39:24.687663655Z",
"end":"2017-08-31T12:40:00+09:00"
},
// [...]
The variations encountered in the LCP server dates should be normalized, to simplify their usage.
creating this issue as a reminder for myself
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.