Support Center

Have feedback or questions on this section? Just click the Help tab on the right side of your screen.

Publisher/Code

Contents

Quick Start

1. Serve Ads

2. Serve Rewarded Ads

Maximize Fill Rate

3. Mediate Networks

4. Sell Direct Ads

5. Cross-Promote House Ads

Reference Links

Upgrade to 4.x

Technical Quick Start

Ad Space Setup

Manage Rewards


Jump to:

Step 1: Serve Ads in fewer than 10 minutes


You can serve interstitial and banner ads very quickly and with little effort using Flurry AppSpot. The following 3 steps are common to all ad types served through Flurry AppSpot.

  1. Download the Flurry iOS SDK. This download will contain both the Flurry Analytics and Flurry AppSpot modular libraries
  2. Add the Flurry Analytics and AppSpot libs to your project by dragging the Flurry/ and FlurryAds/ folders into your project’s file folder (NOTE: If you are upgrading the Flurry iOS SDK, be sure to remove all existing Flurry library folders before starting.).
  3. Incorporate the following two lines of Flurry code:

#import "Flurry.h"
#import "FlurryAds.h"  
- (BOOL)application:(UIApplication *)application 
   didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {      
 
	[Flurry startSession:@"YOUR_API_KEY"];      
        // Pointer to your rootViewController
	[FlurryAds initialize:window.rootViewController]; 
	// Your code
}


Display Interstitials


This section will show an example interstitial integration. The basic steps involve fetching an ad, checking if the ad is available, followed by displaying the ad.


Phone.png

/**
 *   You can integrate interstitials in any placement in your app, but for
 *   testing purposes we present integration within your ViewController
 */
#import "FlurryAdDelegate.h"
 
- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];
 
	// Register yourself as a delegate for ad callbacks
	[FlurryAds setAdDelegate:self];
 
        // Fetch fullscreen ads early when a later display is likely. For 
        // example, at the beginning of a level. 
	[FlurryAds fetchAdForSpace:@”INTERSTITIAL_MAIN_VIEW” 
           frame:self.view.frame size:FULLSCREEN];
}
 
-(void) viewWillDisappear:(BOOL)animated {
 
       [super viewWillDisappear:animated];
 
	// Reset delegate
	[FlurryAds setAdDelegate:nil];
}
 
/**
 *  Invoke a takeover at a natural pause in your app. For example, when a
 *  level is completed, an article is read or a button is pressed. We will  
 *  mock the display of a takeover when a button is pressed.	
 */
-(IBAction) showFullScreenAdClickedButton:(id)sender {
 
// Check if ad is ready. If so, display the ad
if ([FlurryAds adReadyForSpace:@"INTERSTITIAL_MAIN_VIEW"]) {
        [FlurryAds displayAdForSpace:@"INTERSTITIAL_MAIN_VIEW" 
           onView:self.view];
    } else {
        // Fetch an ad
	[FlurryAds fetchAdForSpace:@"INTERSTITIAL_MAIN_VIEW" 
           frame:self.view.frame size:FULLSCREEN];
    }
}
 
/*
 *  It is recommended to pause app activities when an interstitial is shown.
 *  Listen to should display delegate.
 */
- (BOOL) spaceShouldDisplay:(NSString*)adSpace interstitial:(BOOL)
    interstitial {
    if (interstitial) {
       // Pause app state here
    }
 
    // Continue ad display
    return YES;
}
 
/*
 *  Resume app state when the interstitial is dismissed.
 */
- (void)spaceDidDismiss:(NSString *)adSpace interstitial:(BOOL)interstitial {
   if (interstitial) {
       // Resume app state here
   }
}


Display Banners


The following section will illustrate the method to show banners within your app.


PhoneBanner.png

/**
 *  Banners can be displayed with a single method. Here we will show how you
 *  would display banners when a view appears and remove it when the view
 *  disappears. 
 */
 
- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];
 
        // Fetch and display banner ad
        [FlurryAds fetchAndDisplayAdForSpace:@”BANNER_MAIN_VIEW” 
           view:self.view size:BANNER_BOTTOM];
}
 
-(void) viewWillDisappear:(BOOL)animated {
 
       [super viewWillDisappear:animated];
 
	// Reset delegate
	[FlurryAds removeAdFromSpace:@"BANNER_MAIN_VIEW"];
}