Editions
public class Editions
Main class of Richie’s Editions SDK.
-
Use
editionProductsProvider
to access to edition products, seeEditionProductsProvider
.Declaration
Swift
public private(set) var editionProductsProvider: EditionProductsProvider? { get }
-
Use
editionProvider
to access to editions, seeEditionProvider
.Declaration
Swift
public private(set) var editionProvider: EditionProvider? { get }
-
Use
editionCoverProvider
to get anUIImage
or aData
for an edition cover.The
EditionCoverProvider
protocol conformance can provide anUIImage
, and theEditionCoverDataProvider
conformance provides the image files asData
.Declaration
Swift
public private(set) var editionCoverProvider: (EditionCoverProvider & EditionCoverDataProvider)? { get }
-
Use
downloadedEditionsProvider
to get a list of downloaded editions, seeDownloadedEditionsProvider
.Declaration
Swift
public private(set) var downloadedEditionsProvider: DownloadedEditionsProvider? { get }
-
Use
editionPresenter
to download and present editions, seeEditionPresenter
.Declaration
Swift
public private(set) var editionPresenter: EditionPresenter? { get }
-
Use
downloadedEditionsManager
to delete downloaded editions, seeDownloadedEditionsManager
.Declaration
Swift
public private(set) var downloadedEditionsManager: DownloadedEditionsManager? { get }
-
Use
editionsDiskUsageProvider
to get downloaded editions disk usage, seeEditionsDiskUsageProvider
.Declaration
Swift
public private(set) var editionsDiskUsageProvider: EditionsDiskUsageProvider? { get }
-
Undocumented
Declaration
Swift
public init( bundleId: String, distributedTracingIDSource: DistributedTracingIDSource? = nil, tokenProvider: TokenProvider, analyticsListener: AnalyticsListener?, ads: RichieAdsController? = nil, configuration: EditionsConfiguration = EditionsConfiguration(maxZoomFactor: 1.0) )
-
Use this method to update the configuration of Editions.
It takes an
EditionsConfiguration
object.Declaration
Swift
public func setConfiguration(configuration: EditionsConfiguration)
-
Initialize Editions.
Call this method, and wait for a successful
completion
, before using any of the features, otherwise the SDK will be in a undetermined state. Ifcompletion
ends withsuccess
==false
you can keep callinginitialize
until it finishes successfully.Once
initialize
completes succesfuly you can start querying cached editions or products usingEditionProvider
EditionProductsProvider
, but you need to callupdateFeed(completion:)
if you want to receive new content. The main use case for querying cached editions before updating the feed is to show content to the user as soon as posibble while the feed is being updated.See
initialize()
for an async version of this method.Declaration
Swift
public func initialize(completion: @escaping (_ success: Bool) -> Void)
-
initialize()
AsynchronousSee
initialize(completion:)
for details.Declaration
Swift
public func initialize() async throws
-
Method that updates the editions available through the SDK.
Using
EditionProvider
aftercompletion
finishes with success warranties that it will contain the latest editions available from the feed.Declaration
Swift
public func updateFeed(completion: @escaping (_ success: Bool) -> Void)