SASInterstitialManagerDelegate

Objective-C

@protocol SASInterstitialManagerDelegate <NSObject>

Swift

protocol SASInterstitialManagerDelegate : NSObjectProtocol

SASInterstitialManager delegate.

  • Called when the interstitial manager has loaded an ad successfully.

    The ad can be shown using the ‘showFromViewController:’ method.

    Declaration

    Objective-C

    - (void)interstitialManager:
                (nonnull SASInterstitialManager *)interstitialManager
                didLoadWithInfo:(nonnull SASAdInfo *)adInfo;

    Swift

    func interstitialManager(_ interstitialManager: SASInterstitialManager, didLoadWith adInfo: SASAdInfo)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

    adInfo

    The instance of SASAdInfo related to the loaded ad.

  • Called when the interstitial manager fails to load the ad.

    Declaration

    Objective-C

    - (void)interstitialManager:
                (nonnull SASInterstitialManager *)interstitialManager
         didFailToLoadWithError:(nonnull NSError *)error;

    Swift

    func interstitialManager(_ interstitialManager: SASInterstitialManager, didFailToLoad error: any Error)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

    error

    The error preventing the interstitial from being loaded.

  • Called when the interstitial manager has displayed the interstitial (as a fullscreen modal view controller).

    Declaration

    Objective-C

    - (void)interstitialManagerDidShow:
        (nonnull SASInterstitialManager *)interstitialManager;

    Swift

    optional func interstitialManagerDidShow(_ interstitialManager: SASInterstitialManager)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

  • Called when the interstitial manager did fail to show the interstitial.

    Declaration

    Objective-C

    - (void)interstitialManager:
                (nonnull SASInterstitialManager *)interstitialManager
         didFailToShowWithError:(nonnull NSError *)error;

    Swift

    optional func interstitialManager(_ interstitialManager: SASInterstitialManager, didFailToShow error: any Error)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

    error

    The error preventing the interstitial from being loaded.

  • Called when the fullscreen modal view controller is closed.

    Declaration

    Objective-C

    - (void)interstitialManagerDidClose:
        (nonnull SASInterstitialManager *)interstitialManager;

    Swift

    optional func interstitialManagerDidClose(_ interstitialManager: SASInterstitialManager)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

  • Called when a valid click is registered on the interstitial ad.

    Declaration

    Objective-C

    - (void)interstitialManagerClicked:
        (nonnull SASInterstitialManager *)interstitialManager;

    Swift

    optional func interstitialManagerClicked(_ interstitialManager: SASInterstitialManager)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager calling the delegate.

  • Called when the interstitial starts audio playback.

    Note

    Implement this method if your app also plays audio: pause your player while the ad is playing its own audio and start it back when the ad is finished.

    Declaration

    Objective-C

    - (void)interstitialManagerWillStartAudioPlayback:
        (nonnull SASInterstitialManager *)interstitialManager;

    Swift

    optional func interstitialManagerWillStartAudioPlayback(_ interstitialManager: SASInterstitialManager)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager playing the audio.

  • Called when the interstitial stops audio playback.

    Note

    Implement this method if your app also plays audio: pause your player while the ad is playing its own audio and start it back when the ad is finished.

    Declaration

    Objective-C

    - (void)interstitialManagerDidStopAudioPlayback:
        (nonnull SASInterstitialManager *)interstitialManager;

    Swift

    optional func interstitialManagerDidStopAudioPlayback(_ interstitialManager: SASInterstitialManager)

    Parameters

    interstitialManager

    The instance of SASInterstitialManager stoping audio playback.