Advertisement
lance-gray

showInterstitial() iOS

Feb 22nd, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - ( BOOL ) showInterstitials {
  2.     if ( [ AdColonyAdministratorPublic videoAdCurrentlyRunning ] == NO ) {
  3.     // 1. AdColony
  4.         if ( [ self playAdColonyVideoForSlot: ADCOLONY_FULL_SLOT ] == ADCOLONY_DID_PLAY ) {
  5.             return YES;
  6.         }
  7.  
  8.     // 2. Greystripe
  9.     else if ( [ _gsInterstitial isAdReady ] ) {
  10.             [ _gsInterstitial displayFromViewController: _mainAdViewController ];
  11.             return YES;
  12.         }
  13.  
  14.     // 3. Millennial Media
  15.     else if ( [ _mmAdView showInterstitial ] ) {
  16.             [ _mmAdView fetchInterstitial ];
  17.             return YES;
  18.         }
  19.    
  20.     // 4. MoPub
  21.     else if ( [ _mpInterstitialAdController ready ] ) {
  22.             [ _mpInterstitialAdController showFromViewController: _mainAdViewController ];
  23.             return YES;
  24.         }
  25.  
  26.     // No available ads
  27.     else {
  28.             return NO;
  29.         }
  30.     } else {
  31.         return NO;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement