Giter Site home page Giter Site logo

r2-lcp-swift's People

Contributors

aferditamuriqi avatar alexc4m avatar ettore avatar iaomw avatar iosdevedrlab avatar mickael-menu avatar mickael-menu-mantano avatar openm1nd avatar rkwright avatar stevenzeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r2-lcp-swift's Issues

Importing a Publication requires the passphrase

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.

LCP: if offline, detection should be quick

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.

Dates normalization

//[...]   
"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.

LCPDF forever loading

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.

My code for parsing the publications:

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 {
    ...
}

Dependencies

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 :)

LCP: crash loading an EPUB

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.

Webpage not available

Error messages when opening/closing an LCP protected ebook (may be an application issue).

On Android 9

Steps:

  • open an LCP protected epub; sometime the "Webpage not available page" appears. Swiping removes the message.
  • close an LCP protected epub; the "Webpage not available page" appears.

Screenshot_20190927-163600

Merge r2-lcp-wrapper-swift into r2-lcp-swift

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.