BooksLibraryController
@MainActor
@objc
public class BooksLibraryController : NSObject
BooksLibraryController
is the main entry point for the books functionality of Richie SDK.
-
Undocumented
Declaration
Swift
public typealias BooksLibraryAnalyticsLoggerCallback = (BooksLibraryAnalyticsLogger, AudioHostAppEventSink) -> Void
-
init(ads:
tokenProvider: bookOpening: readingListHost: bookCoverOverlayProvider: booksLibraryNavigationDelegate: articleOpener: stringProvider: useCustomTabs: enabledTabs: displayConfigProvider: appID: topBarProvider: audioPlaybackController: miniplayerProvider: htmlToAttributedStringConverter: booksLibraryAnalyticsEventListener: ) Undocumented
Declaration
Swift
@MainActor public convenience init( ads: RichieAds, tokenProvider: TokenProvider, bookOpening: BookOpening, readingListHost: ReadingListHost?, bookCoverOverlayProvider: BookCoverOverlayProvider?, booksLibraryNavigationDelegate: BooksLibraryNavigationDelegate?, articleOpener: ArticleOpener?, stringProvider: UserVisibleStringProvider?, useCustomTabs: Bool, enabledTabs: [LibraryTab], displayConfigProvider: BooksDisplayConfigProvider, appID: String? = nil, topBarProvider: TopBarProvider? = nil, audioPlaybackController: AudioPlaybackController? = nil, miniplayerProvider: MiniplayerProvider? = nil, htmlToAttributedStringConverter: BooksHTMLToAttributedStringConverter? = nil, booksLibraryAnalyticsEventListener: BooksLibraryAnalyticsEventListener? = nil )
-
init(window:
ads: tokenProvider: bookOpening: readingListHost: backgroundTaskSource: shouldImportLocalBooksToReadingList: booksFeedSortingType: bookCoverOverlayProvider: categoryListIconProvider: booksLibraryNavigationDelegate: articleOpener: backgroundDownloadManager: stringProvider: libraryRootDirectory: applicationSupportRootDirectory: productId: tabBarStyle: categoriesCompositionEnabled: enabledTabs: myBooksFilterItems: searchResultsProviderType: displayConfigProvider: booksLibraryHostAppConfigDataCallback: booksLibraryAnalyticsLoggerCallback: credentialsExchangerCallback: uiReadyCallback: locale: settingsViewControllerProvider: editions: appID: topBarProvider: audioPlaybackController: miniplayerProvider: htmlToAttributedStringConverter: booksLibraryAnalyticsEventListener: ) Undocumented
Declaration
Swift
@MainActor public init( window: UIWindow? = nil, ads: RichieAds, tokenProvider: TokenProvider, bookOpening: BookOpening, readingListHost: ReadingListHost?, backgroundTaskSource: RichieBackgroundTaskSource? = nil, shouldImportLocalBooksToReadingList: Bool = false, booksFeedSortingType: BooksFeedSortingType = .alphabetically, bookCoverOverlayProvider: BookCoverOverlayProvider? = nil, categoryListIconProvider: CategoryListIconProvider? = nil, booksLibraryNavigationDelegate: BooksLibraryNavigationDelegate? = nil, articleOpener: ArticleOpener?, backgroundDownloadManager: RichieBackgroundDownloadManager? = nil, stringProvider: UserVisibleStringProvider? = nil, libraryRootDirectory: String? = nil, applicationSupportRootDirectory: String? = nil, productId: String? = nil, tabBarStyle: BooksLibraryTabBarStyle = .custom, categoriesCompositionEnabled: Bool = true, enabledTabs: [LibraryTab] = [.discover, .myBooks, .podcasts, .catalog], myBooksFilterItems: [BooksFilterItem]? = nil, searchResultsProviderType: SearchResultsProviderType = .regular, displayConfigProvider: BooksDisplayConfigProvider, booksLibraryHostAppConfigDataCallback: ((Data) -> Void)? = nil, booksLibraryAnalyticsLoggerCallback: BooksLibraryAnalyticsLoggerCallback? = nil, credentialsExchangerCallback: ((CredentialsExchanging) -> Void)? = nil, uiReadyCallback: (() -> Void)? = nil, locale: Locale = Locale.autoupdatingCurrent, settingsViewControllerProvider: ViewControllerProvider? = nil, editions: EditionsBooksContext? = nil, appID: String? = nil, topBarProvider: TopBarProvider? = nil, audioPlaybackController: AudioPlaybackController? = nil, miniplayerProvider: MiniplayerProvider? = nil, htmlToAttributedStringConverter: BooksHTMLToAttributedStringConverter? = nil, booksLibraryAnalyticsEventListener: BooksLibraryAnalyticsEventListener? = nil )
-
Undocumented
Declaration
Swift
@MainActor @objc public func start()
-
Undocumented
Declaration
Swift
@MainActor public func invalidate()
-
Undocumented
Declaration
Swift
@MainActor public func updateBillingAnalytics(withExtraAttributes attributes: [String : Any]?)
-
Undocumented
Declaration
Swift
@MainActor public func updateAnalytics(withExternalAttributes attributes: [String : Any?])
-
Reset user state (remove user specific files, close book views.)
Call this when logging out.
Declaration
Swift
@MainActor public func resetUserState()
-
Reset library UI
Call this to return the library UI to its initial state.
Declaration
Swift
@MainActor public func resetLibraryUI()
-
Refresh user state.
Call this when logging in.
Declaration
Swift
@MainActor public func refreshUserState()
-
Get book for given id.
Declaration
Swift
@MainActor public func book(for id: String) -> Book?
-
Handle a push notification that is received either when the app is running or when it is started because of it.
Declaration
Swift
@MainActor public func handlePushNotification(_ push: BooksPushNotification)
-
Undocumented
Declaration
Swift
@MainActor @objc public func createViewController() -> UIViewController
-
Undocumented
Declaration
Swift
@MainActor public func createViewController( initialTab: LibraryTab = .discover, splashViewController: UIViewController? = nil, topBarViewController: UIViewController? = nil ) -> UIViewController
-
Undocumented
Declaration
Swift
@MainActor func refreshReadingList()
-
Undocumented
Declaration
Swift
@MainActor func navigate(toTab tab: LibraryTab)
-
Undocumented
Declaration
Swift
@MainActor func currentTab() -> LibraryTab?
-
Undocumented
Declaration
Swift
@MainActor func tabs() -> [LibraryTab]
-
Add an analytics event listener.
Declaration
Swift
@MainActor func addAnalyticsListener(_ listener: BooksLibraryEventListener)
-
Add an analytics event listener.
Declaration
Swift
@MainActor func removeAnalyticsListener(_ listener: BooksLibraryEventListener)