Skip to content

Conversation

@qnga
Copy link
Member

@qnga qnga commented Oct 29, 2025

Add injectLicense to LCPService to provide apps with more control on publication acquisition.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the license injection logic and adds a new public API for injecting LCP license documents into publication packages. The main purpose is to allow users to manually inject licenses into downloaded publications without using the acquirePublication method.

Key Changes

  • Extracted license injection logic into a reusable private method injectLicenseAndGetFormat
  • Added a new public API LCPService.injectLicenseDocument(_:in:) for manual license injection
  • Simplified the acquirePublication method by delegating to the extracted helper

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Sources/LCP/Services/LicensesService.swift Refactored acquirePublication to extract license injection logic into injectLicenseAndGetFormat; added injectLicenseDocument method
Sources/LCP/LCPService.swift Added public injectLicenseDocument API that wraps the internal service method
CHANGELOG.md Documented the new injectLicenseDocument API addition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@mickael-menu mickael-menu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@mickael-menu mickael-menu merged commit ba6d8c0 into readium:develop Oct 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants