The base delegate callback declaration for ads, including placement-level and ad source-level load success or failure callbacks, as well as bidding completion and bidding failure callbacks for bidding ad sources. The methods below @optional are optional.
For the extra parameter in some delegate methods, you can click here to view details.
@protocol ATAdLoadingDelegate<NSObject>
/// Callback when the ad is loaded successfully
/// - Parameter placementID: Placement ID
- (void)didFinishLoadingADWithPlacementID:(NSString *)placementID;
/// Callback when the ad fails to load
/// - Parameter placementID: Placement ID
/// - Parameter error: Object containing error information
- (void)didFailToLoadADWithPlacementID:(NSString*)placementID
error:(NSError*)error;
@optional
/// Get impression revenue
/// - Parameters:
/// - placementID: Placement ID
/// - extra: Extra parameters for the developer to receive information
- (void)didRevenueForPlacementID:(NSString *)placementID
extra:(NSDictionary *)extra;
/// Callback for when a specific ad source within the placement starts loading the ad
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
- (void)didStartLoadingADSourceWithPlacementID:(NSString *)placementID
extra:(NSDictionary*)extra;
/// Callback for when a specific ad source within the placement successfully loads the ad
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
- (void)didFinishLoadingADSourceWithPlacementID:(NSString *)placementID
extra:(NSDictionary*)extra;
/// Callback for when a specific ad source within the placement fails to load the ad
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
/// - Parameter error: Object containing error information
- (void)didFailToLoadADSourceWithPlacementID:(NSString*)placementID
extra:(NSDictionary*)extra
error:(NSError*)error;
/// Callback for when a specific bidding ad source within the placement starts bidding
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
- (void)didStartBiddingADSourceWithPlacementID:(NSString *)placementID
extra:(NSDictionary*)extra;
/// Callback for when a specific bidding ad source within the placement successfully completes bidding
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
- (void)didFinishBiddingADSourceWithPlacementID:(NSString *)placementID
extra:(NSDictionary*)extra;
/// Callback for when a specific bidding ad source within the placement fails bidding
/// - Parameter placementID: Placement ID
/// - Parameter extra: Specific information about the ad source
/// - Parameter error: Object containing error information
- (void)didFailBiddingADSourceWithPlacementID:(NSString*)placementID
extra:(NSDictionary*)extra
error:(NSError*)error;
@end