Object notified when an ad request succeeds or fails. Must conform to requested ad types’
delegate protocol. This property must be set before initiating ad requests.
Declaration
Swift
weak var delegate: (any AdLoaderDelegate)? { get set }
The root view controller is used to present ad click actions.
adTypes
An array of ad types. See GADAdLoaderAdTypes.h for available ad types.
options
An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil
to use default options. See each ad type’s header for available GADAdLoaderOptions subclasses.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADAdLoader\u003c/code\u003e is responsible for loading various ad types, specified using \u003ccode\u003eGADAdLoaderAdTypes\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt requires an ad unit ID and a delegate conforming to the requested ad type's delegate protocol.\u003c/p\u003e\n"],["\u003cp\u003eYou can initiate the ad loading process using the \u003ccode\u003eloadRequest:\u003c/code\u003e or \u003ccode\u003eloadWithAdResponseString:\u003c/code\u003e method, providing a \u003ccode\u003eGADRequest\u003c/code\u003e or an ad response string.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGADAdLoader\u003c/code\u003e offers options to configure the ad loading behavior through \u003ccode\u003eGADAdLoaderOptions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eA root view controller is used to present any ad click actions.\u003c/p\u003e\n"]]],["The `GADAdLoader` class loads ads, with available types specified in `GADAdLoaderAdTypes.h`. Key actions include setting a delegate to receive ad success/failure notifications, using an `adUnitID`, and checking `isLoading` status. Initialization involves specifying `adUnitID`, `rootViewController`, `adTypes`, and optional configurations. Ads are loaded via `loadRequest:` or `load(with adResponseString:)`, informing the delegate of the result. `ServerToServer` offers initialization with a root view controller, and loading via an ad response string.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADAdLoader\n===========\n\n\n @interface GADAdLoader : NSObject\n\nLoads ads. See GADAdLoaderAdTypes.h for available ad types.\n- `\n ``\n ``\n `\n\n ### [delegate](#/c:objc(cs)GADAdLoader(py)delegate)\n\n `\n ` \n Object notified when an ad request succeeds or fails. Must conform to requested ad types'\n delegate protocol. This property must be set before initiating ad requests. \n\n #### Declaration\n\n Swift \n\n weak var delegate: (any AdLoaderDelegate)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GADAdLoaderDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n ### [adUnitID](#/c:objc(cs)GADAdLoader(py)adUnitID)\n\n `\n ` \n The ad loader's ad unit ID. \n\n #### Declaration\n\n Swift \n\n var adUnitID: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) NSString *adUnitID;\n\n- `\n ``\n ``\n `\n\n ### [loading](#/c:objc(cs)GADAdLoader(py)loading)\n\n `\n ` \n Indicates whether the ad loader is loading. \n\n #### Declaration\n\n Swift \n\n var isLoading: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly, getter=isLoading) BOOL loading;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAdUnitID:rootViewController:adTypes:options:](#/c:objc(cs)GADAdLoader(im)initWithAdUnitID:rootViewController:adTypes:options:)\n\n `\n ` \n Returns an initialized ad loader configured to load the specified ad types. \n\n #### Declaration\n\n Swift \n\n init(adUnitID: String, rootViewController: UIViewController?, adTypes: [AdLoaderAdType], options: [../Classes.html#/c:objc(cs)GADAdLoaderOptions]?)\n\n Objective-C \n\n - (nonnull instancetype)\n initWithAdUnitID:(nonnull NSString *)adUnitID\n rootViewController:(nullable UIViewController *)rootViewController\n adTypes:(nonnull NSArray\u003c../Type-Definitions.html#/c:GADAdLoaderAdTypes.h@T@GADAdLoaderAdType\u003e *)adTypes\n options:(nullable NSArray\u003c../Classes.html#/c:objc(cs)GADAdLoaderOptions *\u003e *)options;\n\n #### Parameters\n\n |----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*rootViewController*` ` | The root view controller is used to present ad click actions. |\n | ` `*adTypes*` ` | An array of ad types. See GADAdLoaderAdTypes.h for available ad types. |\n | ` `*options*` ` | An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to use default options. See each ad type's header for available GADAdLoaderOptions subclasses. |\n\n- `\n ``\n ``\n `\n\n ### [-loadRequest:](#/c:objc(cs)GADAdLoader(im)loadRequest:)\n\n `\n ` \n Loads the ad and informs the delegate of the outcome. \n\n #### Declaration\n\n Swift \n\n func load(_ request: Request?)\n\n Objective-C \n\n - (void)loadRequest:(nullable ../Classes/GADRequest.html *)request;\n\n[ServerToServer\n--------------](#/ServerToServer)\n\n- `\n ``\n ``\n `\n\n ### [-initWithRootViewController:](#/c:objc(cs)GADAdLoader(im)initWithRootViewController:)\n\n `\n ` \n Returns an initialized ad loader. \n\n #### Declaration\n\n Swift \n\n init(rootViewController: UIViewController?)\n\n Objective-C \n\n - (nonnull instancetype)initWithRootViewController:\n (nullable UIViewController *)rootViewController;\n\n #### Parameters\n\n |----------------------------|------------------------------------------------------------|\n | ` `*rootViewController*` ` | The root view controller used to present ad click actions. |\n\n- `\n ``\n ``\n `\n\n ### [-loadWithAdResponseString:](#/c:objc(cs)GADAdLoader(im)loadWithAdResponseString:)\n\n `\n ` \n Loads the ad and informs the delegate of the outcome. \n\n #### Declaration\n\n Swift \n\n func load(with adResponseString: String)\n\n Objective-C \n\n - (void)loadWithAdResponseString:(nonnull NSString *)adResponseString;"]]