YMANativeBulkAdLoaderDelegate

Objective-C

@protocol YMANativeBulkAdLoaderDelegate <NSObject>

Swift

protocol YMANativeBulkAdLoaderDelegate : NSObjectProtocol

The protocol defines the methods of the delegate that tracks ad loading.

  1. -nativeBulkAdLoader:didLoadAds:
  2. -nativeBulkAdLoader:didFailLoadingWithError:

-nativeBulkAdLoader:didLoadAds:

Called when the ads are loaded.

Declaration

Objective-C

- (void)nativeBulkAdLoader:(nonnull YMANativeBulkAdLoader *)nativeBulkAdLoader
                didLoadAds:(nonnull NSArray<id<YMANativeAd>> *)ads;

Parameters

nativeBulkAdLoader

A reference to the object of the YMANativeBulkAdLoader class that invoked the method.

ads

An array of loaded ads.

nativeBulkAdLoader

A reference to the object of the YMANativeBulkAdLoader class that invoked the method.

ads

An array of loaded ads.

-nativeBulkAdLoader:didFailLoadingWithError:

Called if ad loading failed.

Declaration

Objective-C

- (void)nativeBulkAdLoader:(nonnull YMANativeBulkAdLoader *)nativeBulkAdLoader
    didFailLoadingWithError:(nonnull NSError *)error;

Swift

func nativeBulkAdLoader(_ nativeBulkAdLoader: YMANativeBulkAdLoader, didFailLoadingWithError error: Error)

Parameters

nativeBulkAdLoader

A reference to the object of the YMANativeBulkAdLoader class that invoked the method.

error

Information about the error (for details, see YMAAdErrorCode).

nativeBulkAdLoader

A reference to the object of the YMANativeBulkAdLoader class that invoked the method.

error

Information about the error (for details, see YMAAdErrorCode).