AATNativeAdPlacement
@objc public protocol AATNativeAdPlacement {
/// Set the placement delegate that will listen to ad loading and display events.
var delegate: AATNativePlacementDelegate? { get set }
/// Sets the placement statistics delegate
var statisticsDelegate: AATStatisticsDelegate? { get set }
/// Sets the placement impression delegate
var impressionDelegate: AATImpressionDelegate? { get set }
/// Requests placement reload.
///
func reload() -> Bool
/// Returns how many ads are currently loading for given native ad placement.
/// - Returns: Number of ads that are currently loading for given placement.
func getNumberOfCurrentlyLoadingNativeAds() -> Int
/// Returns true if there is an ad loaded.
/// - Returns: True if there is an ad loaded.
func hasAd() -> Bool
/// Manually Count an Ad Space
func reportAdSpace() -> Bool
/// Returns the instance of native ad for given native ad placement.
/// - Returns: Native ad instance if it is loaded for given placement, null otherwise.
func getNativeAd() -> AATNativeAdData?
/// Sets the targeting information for the placement
///
/// Information provided for placement overrides targeting information overrides targeting information for application set by the ``AATSDK/setTargetingInfo(info:)``
var targetingInfo: [String : [String]]? { get set }
/// Sets the content targeting url for the placement.
///
/// Information provided for placement overrides targeting information for application set by the ``AATSDK/setContentTargetingUrl(targetingUrl:)``
var contentTargetingUrl: String? { get set }
/// Checks if the frequency cap has been reached.
/// - Returns: true if the frequency cap has been reached.
func isFrequencyCapReached() -> Bool
}
@protocol AATNativeAdPlacement <AATPlacement>
/// Set the placement delegate that will listen to ad loading and display events.
@property (nonatomic, strong) id <AATNativePlacementDelegate> _Nullable delegate;
/// Sets the placement statistics delegate
@property (nonatomic, strong) id <AATStatisticsDelegate> _Nullable statisticsDelegate;
/// Sets the placement impression delegate
@property (nonatomic, strong) id <AATImpressionDelegate> _Nullable impressionDelegate;
/// Requests placement reload.
- (BOOL)reload;
/// Returns how many ads are currently loading for given native ad placement.
///
/// returns:
/// Number of ads that are currently loading for given placement.
- (NSInteger)getNumberOfCurrentlyLoadingNativeAds;
/// Returns true if there is an ad loaded.
///
/// returns:
/// True if there is an ad loaded.
- (BOOL)hasAd SWIFT_WARN_UNUSED_RESULT;
/// Manually Count an Ad Space
- (BOOL)reportAdSpace SWIFT_WARN_UNUSED_RESULT;
/// Returns the instance of native ad for given native ad placement.
///
/// returns:
/// Native ad instance if it is loaded for given placement, null otherwise.
- (id <AATNativeAdData> _Nullable)getNativeAd;
/// Sets the targeting information for the placement
/// Information provided for placement overrides targeting information overrides targeting information for application set by the <code>AATSDK/setTargetingInfo(info:)</code>
@property (nonatomic, copy) NSDictionary<NSString *, NSArray<NSString *> *> * _Nullable targetingInfo;
/// Sets the content targeting url for the placement.
/// Information provided for placement overrides targeting information for application set by the <code>AATSDK/setContentTargetingUrl(targetingUrl:)</code>
@property (nonatomic, copy) NSString * _Nullable contentTargetingUrl;
/// Checks if the frequency cap has been reached.
///
/// returns:
/// true if the frequency cap has been reached.
- (BOOL)isFrequencyCapReached;
@end
Last updated