NativeAdLoader
@objc(YMANativeAdLoader)
@objcMembers
public final class NativeAdLoader : NSObject, @unchecked Sendable
This class is responsible for loading native ads.
-
Undocumented
Declaration
Swift
override public convenience init() -
Loads an ad with the specified targeting data.
Declaration
Swift
public func loadAd( with request: AdRequest, options: NativeAdOptions = .init(), completion: @escaping @MainActor (Result<NativeAd, Error>) -> Void )Parameters
requestData for targeting.
optionsConfiguration options for native ad loading. Default options load images automatically.
completionThe completion handler to be called when the ad loading is finished.
-
loadAd(with:Asynchronousoptions: ) Asynchronously loads an ad with the specified targeting data.
Declaration
Swift
public func loadAd( with request: AdRequest, options: NativeAdOptions = .init() ) async throws -> NativeAdParameters
requestData for targeting.
optionsConfiguration options for native ad loading. Default options load images automatically.