AFAdSDKModalDelegate Protocol Reference

Conforms to NSObject
Declared in AppsfireAdSDK.h

Overview

AFAdSDKModalDelegate provides additional information on actions performed on the modal ad.

– shouldDisplayModalAd

Called when a modal ad is going to be presented on the screen. Depending the state of your application, you may want to cancel the display of the ad.

- (BOOL)shouldDisplayModalAd

Return Value

YES if you authorize the ad to display, NO if the ad shouldn’t display. If this method isn’t implemented, the default value is YES. If you return NO, the request will be canceled and an error will be fired through modalAdRequestDidFailWithError:

Declared In

AppsfireAdSDK.h

– modalAdRequestDidFailWithError:

Called when a modal ad failed to present. You can use the code in the NSError to analyze precisely what went wrong.

- (void)modalAdRequestDidFailWithError:(NSError *)error

Parameters

error

The error object filled with the appropriate ‘code’ and ‘localizedDescription’.

Declared In

AppsfireAdSDK.h

– modalAdWillAppear

Called when the modal ad is going to be presented.

- (void)modalAdWillAppear

Declared In

AppsfireAdSDK.h

– modalAdDidAppear

Called when the modal ad was presented.

- (void)modalAdDidAppear

Declared In

AppsfireAdSDK.h

– modalAdWillDisappear

Called when the modal ad is going to be dismissed.

- (void)modalAdWillDisappear

Discussion

Note: In case of in-app download, the method is called when the last modal disappears.

Declared In

AppsfireAdSDK.h

– modalAdDidDisappear

Called when the modal ad was dismissed.

- (void)modalAdDidDisappear

Declared In

AppsfireAdSDK.h