Other Classes
The following classes are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@interface MaggioAnalyticsContextData : NSObject +(NSString *) appName; +(NSString *) bundleId; +(NSDictionary *) deviceAttributes; +(NSString *) timestamp; +(NSString *) timestampWithTZ; +(NSString *) timestampWithLocalTZ; +(NSDateFormatter *) dateFormatterForTZ; @end
Swift
class MaggioAnalyticsContextData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface MaggioGuid : NSObject <NSCopying> +(nullable instancetype) guidWithString:(nullable NSString *)string; +(instancetype) guidWithUUID:(NSUUID *)uuid; /// The wrapped UUID value. @property (nonatomic, readonly) NSUUID *uuid; /// Returns the stringified UUID as returned by \c UUIDString on \c NSUUID. @property (nonatomic, readonly) NSString *UUIDString; /// Returns lowercased guid string for backward compatibility. You should use \c uuid for equality comparisons. @property (nonatomic, readonly) NSString *string; @end
Swift
class MaggioGuid : NSObject, NSCopying
-
Undocumented
Declaration
Objective-C
@interface MaggioMustacheAnalyticsTemplateRenderer : NSObject <MaggioAnalyticsTemplateRenderer> @end
Swift
class MaggioMustacheAnalyticsTemplateRenderer : NSObject, MaggioAnalyticsTemplateRenderer
-
RichieAds is the old main interface to Richie SDK’s ad system. You should look at
RichieAdsController
with new code.NOTE: Many RichieAds methods are thread-safe, but their correct operation from the caller’s point of view requires them to be called from a single thread. Using RichieAds from main thread only is recommended. If slot ads are used, use from main thread is mandatory to ensure correct state observing from the client’s point of view.
-placeholderImageForAdWithIdentifier:
methods are explicitly safe and good to be used from any thread.-viewForAdWithIdentifier:
is explicitly main thread only.Timing of calling
-startLoadingAd
and-containerWillBeDeleted
may result in situations the caller didn’t intend or could not foresee, if multiple places of an app call these from multiple threads. Download state will change in a background thread, meaning calling-startLoadingAdWithIdentifier:
and immediately calling-hasLoadedAdWithIdentifier:
may returnYES,
in case an actual download wasn’t required (creative had been downloaded to another container).It’s safe to manipulate a container from a single thread (preferably the main thread, which is used to post notifications). Even then state can be unexpected after calling
See more-startLoadingAdWithIdentifier:.
A supported and safe pattern is to usehasLoadedAdWithIdentifier:
and then start loading the ad with-startLoadingAdWithIdentifier:
if ad hasn’t been loaded. App should then wait for ad did load notification.Declaration
Objective-C
@interface RichieAds : NSObject
Swift
class RichieAds : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieAdsView : UIView @property (nonatomic, readonly, nonnull) NSString *adIdentifier; -(void) didAppear; //!< MUST be called by host application when RichieAdsView becomes visible on screen and can be interacted by the user. NOTE: implementation cause heavy operations, don't call while app must stay responsive. Do not call this method until the view is actually visible on screen and the user is able to begin interacting with it. Calling this method prematurely will cause possible animations and timers of creatives to be wrong. -(void) didDisappear; //!< MUST be called by host application when RichieAdsView is not visible on screen and user cannot interact with it anymore. This method automatically does nothing if a modal viewController is presented over the -richieView:viewControllerForPresentingModalInAppBrowserForURL:. -(void) preloadAdContent; //!< Can be called to hint the RichieAdsView to preload HTML ad content without making it active. NOTE: implementation causes heavy operations, don't call while app must stay responsive. Also note that this is just a hint, Richie Ads might not do the preloading if it would cause too much memory pressure on the device. -(void) invalidate; //!< SHOULD be called when view is removed from view hierarchy and discarded. -(void) setMaximumResizeSize:(CGSize)maximumResizeSize; //!< SHOULD be called when view is laid out, so it can provide the information for MRAID compliant creative. @property (nonatomic, readonly, weak, nullable) id<RichieAdsViewDelegate> delegate; @end
Swift
class RichieAdsView : UIView
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieAdsSlotAdFlight : NSObject -(nonnull instancetype) init NS_UNAVAILABLE; @end
Swift
class RichieAdsSlotAdFlight : NSObject
-
This class provides support for easily handling NSURLSession background downloads introduced in iOS 7.
Initialize a single instance in @p -application:didFinishLaunchingWithOptions: and keep a strong reference to it. Pass the instance to Richie and Maggio when creating those to enable background downloads.
See documentation for
reconnectToActiveDownloads
and @p -handleEventsForBackgroundURLSession:completionHandler: for more information on how to integrate RichieBackgroundDownloadManager with UIApplication.NOTE: Create only one instance of RichieBackgroundDownloadManager. Use the instance from the main thread only.
See moreDeclaration
Objective-C
@interface RichieBackgroundDownloadManager : NSObject
Swift
class RichieBackgroundDownloadManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieBooksBookLoadingState : NSObject @property (nonatomic, readonly) int64_t bytesDownloaded; @property (nonatomic, readonly) int64_t expectedByteLength; @end
Swift
class RichieBooksBookLoadingState : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieBooksBook : NSObject -(nonnull instancetype) init NS_UNAVAILABLE; @property (nonatomic, readonly, nonnull) MaggioGuid *guid; @property (nonatomic, readonly) NSInteger version; //!< Version number of downloaded book instance. Book can be modified on server and that will increment version number. The version number is zero when book hasn't been downloaded. Zero is not a valid version number. @property (nonatomic, readonly) RichieBooksBookPresentationState presentationState; @property (nonatomic, readonly) RichieBooksBookDiskState diskState; @property (nonatomic, readonly, nullable) RichieBooksBookLoadingState *loadingState; //!< @p nil if loading is not in progress. @property (nonatomic, readonly, nullable) NSDate *modificationDate; -(BOOL) touchMetadata; -(void) addListener:(nonnull id<RichieBooksBookListener>)listener; //!< @note Listeners are held weakly. -(void) removeListener:(nonnull id<RichieBooksBookListener>)listener; @end
Swift
class RichieBooksBook : NSObject
-
RichieBooksLibrary manages a set of books on the local file system.
See moreDeclaration
Objective-C
@interface RichieBooksLibrary : NSObject
Swift
class RichieBooksLibrary : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieBooksSingleBookProvider : NSObject -(instancetype) initWithBooksLibrary:(RichieBooksLibrary *)library; -(void) loadBookWithURL:(NSURL *)url iv:(NSString *)iv key:(NSString *)key forWindowSize:(CGSize)windowSize completion:(void (^)(RichieBooksBook *))completionBlock; @end
Swift
class RichieBooksSingleBookProvider : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieV1Cryptor : NSObject <RichieCryptor> /** @p iv is optional, can be nil. */ +(nullable id<RichieCryptor>) encryptorForAESWithKey:(nonnull NSData *)key iv:(nullable NSData *)iv; /** @p iv is optional, can be nil. */ +(nullable id<RichieCryptor>) decryptorForAESWithKey:(nonnull NSData *)key iv:(nullable NSData *)iv; @end
Swift
class RichieV1Cryptor : NSObject, RichieCryptor
-
@brief Abstract UIView subclass for managing indexed collection of subviews.
RichieIndexedContainerView
is an abstract view class for managing indexed collection of subviews. It implements array management for the indexed views and provides callbacks for managing the subview layout.The main idea behind
RichieIndexedContainerView
is that can handle lazily loading and unloading subviews in a similar fashion to UITableView. Views are loaded and added to view hierarchy when they become visible, and are then removed from view hierarchy when they are moved outside of viewable area. It is up to concrete subclasses to manage firstVisibleIndex and lastVisibleIndex, and call setNeedsViewRefresh when they change. This will schedule a view refresh to be done at layout time.It is up to the concrete subclass to actually add and remove the managed views to and from the view hierarchy. This allows all kinds of intelligent caching behaviors.
Concrete subclasses can implemented any kind of actual layout for the subviews.
See moreRichieIndexedContainerView
delegates frame setting behavior to subclasses by calling -setFrameForView:atIndex: whenever visible views need refreshing. The implementation for this method should be efficient, because this method will be called often.Declaration
Objective-C
@interface RichieIndexedContainerView : UIView
Swift
class RichieIndexedContainerView : UIView
-
@brief View for scrolling between pages that are UIViews.
RichiePageScrollerView
implements a scrolling view which contains “pages” or different views. Views can have different widths, as returned by dataSource method pageScrollerView:widthOfPageAtIndex:.Only a subset of views is kept in memory, very much like
See moreUITableView
handles cells in a long table.Declaration
Objective-C
@interface RichiePageScrollerView : RichieIndexedContainerView
Swift
class RichiePageScrollerView : RichieIndexedContainerView
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieRemoteReporter : NSObject @property (class) RichieRemoteReporting *shared; @end
Swift
class RichieRemoteReporter : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieRemoteReportingSpan : NSObject - (instancetype)initWithStartSpanBlock:(RichieRemoteReportingSpan * _Nullable (^)(NSString *))startChildSpanBlock finishBlock:(void(^)(void))finishBlock; - (nullable RichieRemoteReportingSpan *)startSpanWithName:(NSString *)name; - (void)finish; @end
Swift
class RichieRemoteReportingSpan : NSObject
-
NOTE: Default value for modalPresentationStyle is UIModalPresentationOverFullScreen (on iOS 8 and later).
See moreDeclaration
Objective-C
@interface RichieSwiperViewController : UIViewController
Swift
class RichieSwiperViewController : UIViewController
-
Undocumented
See moreDeclaration
Objective-C
@interface RichieUIApplicationBackgroundTaskSource : NSObject <RichieBackgroundTaskSource> -(instancetype) initWithApplication:(UIApplication *)application NS_DESIGNATED_INITIALIZER; -(instancetype) init NS_UNAVAILABLE; @end
Swift
class RichieUIApplicationBackgroundTaskSource : NSObject, RichieBackgroundTaskSource
-
Richie
is the main entry point to the Richie SDK.Use
Richie
to construct the top-level SDK objects for ads, books and editions. You can use theshared
property if you prefer a singleton, or just pass around an instance.Richie
stores the objects you create, so that the first call tomakeX
creates theX
, and subsequent calls return the same object.Warning
Do not construct multiple
Richie
instances at the same time. They use the same resources on disk and will interfere with each other.Declaration
Swift
@MainActor public final class Richie
-
Undocumented
See moreDeclaration
Swift
public class BooksLibraryEditionsEventLogger : AnalyticsListener
-
Undocumented
See moreDeclaration
Swift
public class EditionsBooksContext
-
Undocumented
See moreDeclaration
Swift
public final class BooksPushNotification
-
Undocumented
Declaration
Swift
@objc public final class AudioPlaybackController : NSObject
-
Undocumented
Declaration
Swift
@objc public final class MiniplayerProvider : NSObject
-
Provider for JSON decoder that parses ISO8601 dates with or without fractional seconds.
See moreDeclaration
Swift
public class ISO8601DecoderProvider
-
RichieAdsController
is the main interface for loading ads with Richie SDK.If possible, you should be using this class instead of
See moreRichieAds
. RichieAds does not force usage from the main thread but strongly recommends it; this class forces the issue and defines itself to work on the main actor.Declaration
Swift
@MainActor public final class RichieAdsController
-
Undocumented
See moreDeclaration
Swift
@objc public class RichieRemoteReportingLocalLog : NSObject
-
Undocumented
See moreDeclaration
Swift
@objc public class RichieSwiperAdTracker : NSObject
-
Undocumented
See moreDeclaration
Swift
@objc public class RichieLinkTapHandler : NSObject, SKStoreProductViewControllerDelegate