iOS SDK  7.3.0
 All Classes Files Functions Properties Pages
FlurryAdInterstitial Class Reference

Provides all available methods for displaying interstitial ads. More...

#import <FlurryAdInterstitial.h>

Inherits NSObject.

Instance Methods

(id) - initWithSpace:
 Initialize the interstitial ad object. More...
 
(void) - fetchAd
 Retrieves an ad for this object using the adspace specified in the initializer routine. More...
 
(void) - presentWithViewController:
 Display the ad associated with this ad object. More...
 

Properties

NSString * space
 Read only property that can be used to retrieve the ad space that was passed into an initializer routine. An Ad Space is an area within your app that is designated to display ads. Ad spaces need to be setup and configured on the Flurry developer portal. More...
 
FlurryAdTargetingtargeting
 This property should be used for ad targeting based on parameters such as location, targeting kewords, age and gender. More...
 
id< FlurryAdInterstitialDelegateadDelegate
 Sets the object to receive various delegate methods. More...
 
BOOL ready
 Returns if an ad is currently ready to display for this ad object. More...
 

Detailed Description

Provides all available methods for displaying interstitial ads.

Set of methods that allow publishers to configure, target, and deliver ads to their customers.

Note
This class depends on Flurry.h. For information on how to use Flurry's Ads SDK to attract high-quality users and monetize your user base see Support Center - Publishers.
Author
2009 - 2014 Flurry, Inc. All Rights Reserved.
Version
6.0.0

Definition at line 28 of file FlurryAdInterstitial.h.

Method Documentation

- (void) fetchAd

Retrieves an ad for this object using the adspace specified in the initializer routine.

Since
6.0.0

This method will attempt to retrieve ads for this object's ad space from the Flurry server.

See Also

- adInterstitialDidFetchAd: (FlurryAdInterstitialDelegate-p) for details on the notification of ads being received.
- adInterstitial:adError:errorDescription: (FlurryAdInterstitialDelegate-p) for details on notification of failure to receive ads from this request.
- presentWithViewController: for details on displaying an available ad.
@property (strong) FlurryAdInterstitial* adInterstitial;
- (void)fetchAd
{
adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"MAIN_VIEW_INTERSTITIAL"];
adInterstitial.adDelegate = self;
[adInterstitial fetchAd];
}
// Show whenever delegate is invoked
- (void) adInterstitialDidFetchAd:(FlurryAdInterstitial *) adInterstitial {
// Received Ad
[adInterstitial presentWithViewController:self];
}
// Alternatively, try to display at a certain point in the app
- (void) levelComplete {
if([self.adInterstitial ready]) {
[self.adInterstitial presentWithViewController:self];
}
}
- (id) initWithSpace: (NSString *)  space

Initialize the interstitial ad object.

Since
6.0.0

This method initializes the ad object and gets it ready to fetch and serve an interstitial ad.

FlurryAdInterstitial* FlurryAdInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"INTERSTITIAL_AD"];
Parameters
spacerepresents the placement of the ad in your app. e.g. "GAME_END_SCREEN_INTERSTITIAL_AD".
- (void) presentWithViewController: (UIViewController *)  presentingViewController

Display the ad associated with this ad object.

Since
6.0.0

This method will display an ad if one is ready for display on the device.

See Also
- fetchAd for details on retrieving an ad.
ready: for details on verifying is an ad is ready to be displayed.
- adInterstitial:adError:errorDescription: (FlurryAdInterstitialDelegate-p) for details on notification of error in rendering an ad for this request.
- (void)showFullscreenAd
{
if([self.adInterstitial ready]) {
[self.adInterstitial presentWithViewController:self];
}
}
Parameters
viewControllerThe viewController to show the fullscreen ad modally.

Property Documentation

- (id<FlurryAdInterstitialDelegate>) adDelegate
readwritenonatomicweak

Sets the object to receive various delegate methods.

Since
6.0.0

This method allows you to register an object that will receive notifications at different phases of interstitial ad serving.

See Also
FlurryAdInterstitialDelegate for details on delegates available.
-(void) fetchInterstitialAd;
{
FlurryAdInterstitial* interstitialAd = [[FlurryAdInterstitial alloc] initWithSpace:adSpace];
interstitialAd.adDelegate = self;
[interstitialAd fetchAd];
}
Parameters
delegateThe object to receive notifications of various ad actions.
Returns
The ad delegate object if set earlier, or nil if never set

Definition at line 76 of file FlurryAdInterstitial.h.

- (BOOL) ready
readnonatomicassign

Returns if an ad is currently ready to display for this ad object.

Since
6.0.0

This method will verify if an ad is currently available for this ad object. If an ad is not available, you can call fetchAd to load a new ad.

Note
If this method returns YES, an ad will be available.
It is advisable to listen to the delegate adInterstitial:adError:errorDescription: (FlurryAdInterstitialDelegate-p) to get notified if the ad fetch request fails.
See Also
- fetchAd for details on retrieving an ad.
@property FlurryAdInterstitial* adInterstitial
- (void) showInterstitialIfReady
{
if ([self.adInterstitial ready] == YES)
{
[self.adInterstitial presentWithViewController:self];
}
else
{
self.adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"MAIN_VIEW_INTERSTITIAL"];
self.adInterstitial.adDelegate = self;
[self.adInterstitial fetchAd];
}
}
Returns
YES/NO to indicate if an ad is ready to be displayed.

Definition at line 113 of file FlurryAdInterstitial.h.

- (NSString*) space
readnonatomiccopy

Read only property that can be used to retrieve the ad space that was passed into an initializer routine. An Ad Space is an area within your app that is designated to display ads. Ad spaces need to be setup and configured on the Flurry developer portal.

Since
6.0.0
Returns
The ad space string value.

Definition at line 36 of file FlurryAdInterstitial.h.

- (FlurryAdTargeting*) targeting
readwritenonatomicstrong

This property should be used for ad targeting based on parameters such as location, targeting kewords, age and gender.

Since
6.0.0
See Also
FlurryAdTargeting for details.
Parameters
targetingThe ad targeting object.
Returns
The ad targeting that was orignally set or nil if never set.

Definition at line 51 of file FlurryAdInterstitial.h.


The documentation for this class was generated from the following file: