Skip to content

Commit 33ac976

Browse files
committed
Modify method name and CHANGELOG
1 parent fe9cc88 commit 33ac976

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. Take a look
1818
* Added an initializer parameter for providing a custom device identifier (contributed by [@dewantawsif](https://github.com/readium/swift-toolkit/pull/661)).
1919
* You must ensure the identifier is unique and stable for the device (persist and reuse across app launches).
2020
* Recommended: generate an app-scoped UUID and store it securely (e.g., in the Keychain); avoid hardware or advertising identifiers.
21+
* You can use `LCPService.injectLicenseDocument(_:in)` to insert an LCPL into a package, if you downloaded it manually instead of using `LCPService.acquirePublication()`.
2122

2223
### Changed
2324

Sources/LCP/LCPService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ public final class LCPService: Loggable {
8383
/// Injects a `licenseDocument` into a publication package at `url`.
8484
///
8585
/// This is useful if you downloaded the publication yourself instead of using `acquirePublication`.
86-
public func injectLicense(
86+
public func injectLicenseDocument(
8787
_ license: LicenseDocument,
8888
in url: FileURL
8989
) async -> Result<Void, LCPError> {
9090
await wrap {
91-
try await licenses.injectLicense(license, in: url)
91+
try await licenses.injectLicenseDocument(license, in: url)
9292
}
9393
}
9494

Sources/LCP/Services/LicensesService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ final class LicensesService: Loggable {
134134
)
135135
}
136136

137-
func injectLicense(
137+
func injectLicenseDocument(
138138
_ license: LicenseDocument,
139139
in url: FileURL
140140
) async throws {

0 commit comments

Comments
 (0)