# GoogleInteractiveMediaAds Framework Reference

# IMAAdsLoaderDelegate

    @protocol IMAAdsLoaderDelegate

Delegate object that receives state change callbacks from IMAAdsLoader.
- `


  ### [-adsLoader:adsLoadedWithData:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAAdsLoaderDelegate#/c:objc(pl)IMAAdsLoaderDelegate(im)adsLoader:adsLoadedWithData:)


  ` Called when ads are successfully loaded from the ad servers by the loader.

  #### Declaration

  Swift

      func adsLoader(_ loader: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoader.html, adsLoadedWith adsLoadedData: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoadedData.html)

  Objective-C

      - (void)adsLoader:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoader.html *)loader
          adsLoadedWithData:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoadedData.html *)adsLoadedData;

  #### Parameters

  |---|---|
  | ` loader ` | the IMAAdsLoader that received the loaded ad data |
  | ` adsLoadedData ` | the IMAAdsLoadedData instance containing ad data |

- `


  ### [-adsLoader:failedWithErrorData:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAAdsLoaderDelegate#/c:objc(pl)IMAAdsLoaderDelegate(im)adsLoader:failedWithErrorData:)


  ` Error reported by the ads loader when loading or requesting an ad fails.

  #### Declaration

  Swift

      func adsLoader(_ loader: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoader.html, failedWith adErrorData: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdLoadingErrorData.html)

  Objective-C

      - (void)adsLoader:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdsLoader.html *)loader
          failedWithErrorData:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdLoadingErrorData.html *)adErrorData;

  #### Parameters

  |---|---|
  | ` loader ` | the IMAAdsLoader that received the error |
  | ` adErrorData ` | the IMAAdLoadingErrorData instance with error information |