GoogleInteractiveMediaAds Framework Reference

  • The IMAAdsLoaderDelegate protocol defines methods to handle ad loading events in Google's Interactive Media Ads SDK.

  • adsLoader:adsLoadedWithData: is called when ads are successfully loaded, providing access to the ad data through IMAAdsLoadedData.

  • adsLoader:failedWithErrorData: is called if an error occurs during ad loading, providing error details via IMAAdLoadingErrorData.

IMAAdsLoaderDelegate

@protocol IMAAdsLoaderDelegate

Delegate object that receives state change callbacks from IMAAdsLoader.

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

    Declaration

    Swift

    func adsLoader(_ loader: IMAAdsLoader, adsLoadedWith adsLoadedData: IMAAdsLoadedData)

    Objective-C

    - (void)adsLoader:(nonnull IMAAdsLoader *)loader
        adsLoadedWithData:(nonnull IMAAdsLoadedData *)adsLoadedData;

    Parameters

    loader

    the IMAAdsLoader that received the loaded ad data

    adsLoadedData

    the IMAAdsLoadedData instance containing ad data

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

    Declaration

    Swift

    func adsLoader(_ loader: IMAAdsLoader, failedWith adErrorData: IMAAdLoadingErrorData)

    Objective-C

    - (void)adsLoader:(nonnull IMAAdsLoader *)loader
        failedWithErrorData:(nonnull IMAAdLoadingErrorData *)adErrorData;

    Parameters

    loader

    the IMAAdsLoader that received the error

    adErrorData

    the IMAAdLoadingErrorData instance with error information