# GoogleMobileAds Framework Reference

# GADAdLoader


    @interface GADAdLoader : NSObject

Loads ads. See GADAdLoaderAdTypes.h for available ad types.
- `


  ### [delegate](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(py)delegate)


  ` 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 }

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Protocols/GADAdLoaderDelegate.html> delegate;

- `


  ### [adUnitID](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(py)adUnitID)


  ` The ad loader's ad unit ID.

  #### Declaration

  Swift

      var adUnitID: String { get }

  Objective-C

      @property (nonatomic, readonly, nonnull) NSString *adUnitID;

- `


  ### [loading](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(py)loading)


  ` Indicates whether the ad loader is loading.

  #### Declaration

  Swift

      var isLoading: Bool { get }

  Objective-C

      @property (nonatomic, readonly, getter=isLoading) BOOL loading;

- `


  ### [-initWithAdUnitID:rootViewController:adTypes:options:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(im)initWithAdUnitID:rootViewController:adTypes:options:)


  ` Returns an initialized ad loader configured to load the specified ad types.

  #### Declaration

  Swift

      init(adUnitID: String, rootViewController: UIViewController?, adTypes: [AdLoaderAdType], options: [https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes.html#/c:objc(cs)GADAdLoaderOptions]?)

  Objective-C

      - (nonnull instancetype)
            initWithAdUnitID:(nonnull NSString *)adUnitID
          rootViewController:(nullable UIViewController *)rootViewController
                     adTypes:(nonnull NSArray<https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Type-Definitions.html#/c:GADAdLoaderAdTypes.h@T@GADAdLoaderAdType> *)adTypes
                     options:(nullable NSArray<https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes.html#/c:objc(cs)GADAdLoaderOptions *> *)options;

  #### Parameters

  |---|---|
  | ` rootViewController ` | 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. |

- `


  ### [-loadRequest:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(im)loadRequest:)


  ` Loads the ad and informs the delegate of the outcome.

  #### Declaration

  Swift

      func load(_ request: Request?)

  Objective-C

      - (void)loadRequest:(nullable https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADRequest.html *)request;

[## ServerToServer](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/ServerToServer)

- `


  ### [-initWithRootViewController:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(im)initWithRootViewController:)


  ` Returns an initialized ad loader.

  #### Declaration

  Swift

      init(rootViewController: UIViewController?)

  Objective-C

      - (nonnull instancetype)initWithRootViewController:
          (nullable UIViewController *)rootViewController;

  #### Parameters

  |---|---|
  | ` rootViewController ` | The root view controller used to present ad click actions. |

- `


  ### [-loadWithAdResponseString:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADAdLoader#/c:objc(cs)GADAdLoader(im)loadWithAdResponseString:)


  ` Loads the ad and informs the delegate of the outcome.

  #### Declaration

  Swift

      func load(with adResponseString: String)

  Objective-C

      - (void)loadWithAdResponseString:(nonnull NSString *)adResponseString;