Editions
@MainActor
public class Editions
Main class of Richie’s Editions SDK.
To construct an Editions instance, use makeEditions(analyticsListener:tokenProvider:).
-
Use
editionProductsProviderto access to edition products.Declaration
Swift
@MainActor public private(set) var editionProductsProvider: EditionProductsProvider? { get } -
Use
editionProviderto access to editions.Declaration
Swift
@MainActor public private(set) var editionProvider: EditionProvider? { get } -
Use
editionCoverProviderto get anUIImageor aDatafor an edition cover.The
EditionCoverProviderprotocol conformance can provide anUIImage, and theEditionCoverDataProviderconformance provides the image files asData.Declaration
Swift
@MainActor public private(set) var editionCoverProvider: (EditionCoverProvider & EditionCoverDataProvider)? { get } -
Use
downloadedEditionsProviderto get a list of downloaded editions.Declaration
Swift
@MainActor public private(set) var downloadedEditionsProvider: DownloadedEditionsProvider? { get } -
Use
editionPresenterto download and present editions.Declaration
Swift
@MainActor public private(set) var editionPresenter: EditionPresenter? { get } -
Use
downloadedEditionsManagerto delete downloaded editions, seeDownloadedEditionsManager.Declaration
Swift
@MainActor public private(set) var downloadedEditionsManager: DownloadedEditionsManager? { get } -
Use
editionsDiskUsageProviderto get downloaded editions disk usage, seeEditionsDiskUsageProvider.Declaration
Swift
@MainActor public private(set) var editionsDiskUsageProvider: EditionsDiskUsageProvider? { get } -
Updates the editions available through the SDK.
Using
EditionProvideraftercompletionfinishes with success guarantees that it will contain the latest editions available from the feed.See also
updateFeed()is the async version of this method.Declaration
Swift
@MainActor public func updateFeed(completion: @escaping (_ success: Bool) -> Void) -
updateFeed()AsynchronousUpdates the editions available through the SDK.
Using
EditionProvideraftercompletionfinishes with success guarantees that it will contain the latest editions available from the feed.This method is the async version of
updateFeed(completion:).Declaration
Swift
@MainActor public func updateFeed() async -> Bool -
Close any edition readers that are open at the moment.
Declaration
Swift
@MainActor public func closeEditionReader()