Operation extensions for Banner Ads, providing ad display, cache checking, readiness checking, scenario statistics, and other features, including the definition of Extra keys.
typedef void(^NativeMixBannerViewBlock)(ATNativeBannerView *nativeBannerView);
// Only supports Nend banner
extern NSString *const kATBannerLoadingExtraParameters;
extern NSString *const kATAdLoadingExtraBannerAdSizeKey; // Default size is 320 * 50
extern NSString *const kATAdLoadingExtraBannerSizeAdjustKey; // Currently only supports Nend
extern NSString *const kATAdLoadingExtraAdmobBannerSizeKey; // Admob adaptive width
extern NSString *const kATAdLoadingExtraAdmobAdSizeFlagsKey; // Admob ad size flags
@class ATBannerView;
@interface ATAdManager (Banner)
/// Check whether the Banner Ad is ready
/// v5.7.06+
- (BOOL)bannerAdReadyForPlacementID:(NSString *)placementID;
/// Check whether the Banner Ad is ready
/// @param send - Whether to send tracking events
- (BOOL)bannerAdReadyForPlacementID:(NSString *)placementID
sendTK:(BOOL)send;
/// Retrieve the Banner Ad view
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID;
/// Retrieve the Banner Ad view
/// @param placementID - Taku Ad Placement ID
/// @param extra - Local configuration parameters
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
extra:(NSDictionary *)extra DEPRECATED_ATTRIBUTE;
/// Retrieve the Banner Ad view
/// @param placementID - Taku Ad Placement ID
/// @param scene - Scenario ID
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
scene:(NSString *)scene;
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
config:(ATShowConfig *)config;
/// Retrieve the Banner Ad view
/// @param placementID - Taku Ad Placement ID
/// @param scene - Scenario ID
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
scene:(NSString *)scene
nativeMixBannerViewBlock:(nullable NativeMixBannerViewBlock)nativeMixBannerViewBlock;
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
config:(ATShowConfig *)config
nativeMixBannerViewBlock:(nullable NativeMixBannerViewBlock)nativeMixBannerViewBlock;
/// Get the status object ATCheckLoadModel for the current Ad Placement
- (ATCheckLoadModel *)checkBannerLoadStatusForPlacementID:(NSString *)placementID;
/// Query all cached information for the Ad Placement
- (nullable NSArray<NSDictionary *> *)getBannerValidAdsForPlacementID:(NSString *)placementID;
/// Record the cache status statistics of the current Ad Placement in the business scenario
/// @param scene - Ad Scenario
/// v6.2.51+
- (void)entryBannerScenarioWithPlacementID:(NSString *)placementID scene:(NSString *)scene;
@end