AATBannerCache
@objc public class AATBannerCache : NSObject {
/// set statistics delegate
///
/// ``AATStatisticsDelegate`` implementation that will be notified about statistics events.
///
@objc public weak var statisticsDelegate: AATStatisticsDelegate? { get set }
/// Setting impressions delegate
///
/// Set the banner cache ``AATImpressionDelegate``
///
/// ``AATImpressionDelegate`` instance
@objc public var impressionDelegate: AATImpressionDelegate? { get set }
/// Sets the placement collapsible banner options
var collapsableBannerOptions: AATCollapsibleBannerOptions? { get set }
/// Creates a cache of automatically preloaded banner ads.
///
/// - Parameter cacheConfiguration: instance of ``AATBannerCacheConfiguration`` used to configure the cache.
@objc public init(cacheConfiguration: AATBannerCacheConfiguration)
/// Updates the configuration that will be used when requesting new banners.
///
/// - Parameters:
/// - requestConfiguration: AATBannerRequest instance
/// - shouldRefresh: True if the whole cache should be re-loaded with new banner request configuration, false if new configuration should only be used for new requests.
@objc public func updateRequestConfiguration(_ requestConfiguration: AATBannerRequest, shouldRefresh: Bool)
/// Returns an instance of ``AATBannerPlacementWrapperView`` to be used within the app. Also automatically counts an ad space.
///
/// BannerCache will no longer hold any references to returned banners, and they need to be destroyed manually by the app.
///
/// - Parameter force: true if cache should try to return banner ignoring the frequency capping set by { BannerCacheConfiguration.setMinimumDelay(int) }, default value is false
///
/// - Returns: Ad View to be displayed
@objc public func consume(force: Bool = false) -> AATBannerPlacementWrapperView?
/// Destroys the BannerCache, clearing all preloaded banner ads and canceling pending reload requests.
///
/// - For proper memory management, it needs to be called when the BannerCache is no longer needed.
/// - Destroyed BannerCache can no longer be used
@objc public func destroy()
}
@interface AATBannerCache : NSObject
/// set statistics delegate
/// <code>AATStatisticsDelegate</code> implementation that will be notified about statistics events.
@property (nonatomic, weak) id <AATStatisticsDelegate> _Nullable statisticsDelegate;
/// Setting impressions delegate
/// Set the banner cache <code>AATImpressionDelegate</code>
/// <code>AATImpressionDelegate</code> instance
@property (nonatomic, strong) id <AATImpressionDelegate> _Nullable impressionDelegate;
/// Sets the placement collapsible banner options
@property (nonatomic, strong) AATCollapsibleBannerOptions * _Nullable collapsableBannerOptions;
/// Creates a cache of automatically preloaded banner ads.
/// \param cacheConfiguration instance of <code>AATBannerCacheConfiguration</code> used to configure the cache.
- (nonnull instancetype)initWithCacheConfiguration:(AATBannerCacheConfiguration * _Nonnull)cacheConfiguration OBJC_DESIGNATED_INITIALIZER;
/// Updates the configuration that will be used when requesting new banners.
/// \param requestConfiguration AATBannerRequest instance
/// \param shouldRefresh True if the whole cache should be re-loaded with new banner request configuration, false if new configuration should only be used for new requests.
- (void)updateRequestConfiguration:(AATBannerRequest * _Nonnull)requestConfiguration shouldRefresh:(BOOL)shouldRefresh;
/// Returns an instance of <code>AATBannerPlacementWrapperView</code> to be used within the app. Also automatically counts an ad space.
/// BannerCache will no longer hold any references to returned banners, and they need to be destroyed manually by the app.
/// \param force true if cache should try to return banner ignoring the frequency capping set by { BannerCacheConfiguration.setMinimumDelay(int) }, default value is false
/// returns:
/// Ad View to be displayed
- (AATBannerPlacementWrapperView * _Nullable)consumeWithForce:(BOOL)force SWIFT_WARN_UNUSED_RESULT;
/// Destroys the BannerCache, clearing all preloaded banner ads and canceling pending reload requests.
/// For proper memory management, it needs to be called when the BannerCache is no longer needed.
/// Destroyed BannerCache can no longer be used
- (void)destroy;
@end
Last updated