This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "Flurry.h" | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
| // Replace YOUR_API_KEY with the api key in the downloaded package | |
| [Flurry startSession:@"YOUR_API_KEY"]; | |
| //initialize Flurry ad serving, required to provide ViewController | |
| [FlurryAds initialize:self.window.rootViewController]; | |
| // Your code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "FlurryAdInterstitial.h" | |
| #import "FlurryAdInterstitialDelegate.h" | |
| @interface TakeoverViewController () <FlurryAdInterstitialDelegate> | |
| @property (nonatomic, strong) FlurryAdInterstitial* adInterstitial; | |
| @end | |
| @implementation TakeoverViewController | |
| /** | |
| * You can integrate interstitials in any placement in your app, but for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ([adInterstitial ready]) | |
| { | |
| [adInterstitial presentWithViewControler:self]; | |
| } | |
| else | |
| { | |
| adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"INTERSTITIAL"]; | |
| [adInterstitial fetchAd]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "FlurryAdNativeDelegate.h" | |
| @interface SampleTableViewController () <FlurryAdNativeDelegate> | |
| @implementation SampleTableViewController | |
| //For instance, the two most frequently used callbacks are: | |
| - (void) adNativeDidFetchAd:(FlurryAdNative*)nativeAd | |
| { | |
| // The SDK returns this callback for every instance of the native ad fetched. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| flurryNativeAd = [[FlurryAdNative alloc] initWithSpace:@"NativeAd"]; | |
| flurryNativeAd.adDelegate = self; | |
| flurryNativeAd.viewControllerForPresentation = self; | |
| [flurryNativeAd fetchAd]; | |
| flurryNativeAd.trackingView = self; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "FlurryAdNative.h" | |
| #import "FlurryAdNativeDelegate.h" | |
| @interface SampleTableViewController () <FlurryAdNativeDelegate> | |
| @property (nonatomic, retain) FlurryAdNative* nativeAd; | |
| @end | |
| @implementation SampleTableViewController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UIView *nativeAdView = [[UIView alloc]initWithFrame:adFrame]; | |
| UILabel *headlineLabel = [[UILabel alloc] initWithFrame:headlineFrame]; | |
| UILabel *summaryLabel = [[UILabel alloc] initWithFrame:summaryFrame]; | |
| UILabel *sourceLabel = [[UILabel alloc] initWithFrame:sourceFrame]; | |
| UIImageView *adImageView ; | |
| for (int ix = 0; ix < adNative.assetList.count; ++ix) | |
| { | |
| FlurryAdNativeAsset* asset = [adNative.assetList objectAtIndex:ix]; | |
| if ([asset.name isEqualToString:@"headline"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (mFlurryAdInterstitial.isReady()) { | |
| mFlurryAdInterstitial.displayAd(); | |
| } else { | |
| mFlurryAdInterstitial = new FlurryAdInterstitial(this, "INTERSTITIAL"); | |
| mFlurryAdInterstitial.fetchAd(); | |
| } |