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
class ViewController: UIViewController, FlurryAdNativeDelegate { | |
let nativeAd = FlurryAdNative(space:"ADSPACE"); | |
override func viewDidLoad() { | |
super.viewDidLoad(); | |
// Assign the FlurryAdNativeDelegate | |
nativeAd.adDelegate = self; | |
// UIViewController used for presentation of the full screen after the user clicks on the ad | |
nativeAd.viewControllerForPresentation = 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
class ViewController: UIViewController, FlurryAdNativeDelegate { | |
// For instance, the two most frequently used callbacks are: | |
func adNativeDidFetchAd(nativeAd: FlurryAdNative!){ | |
// The SDK returns this callback for every instance of the native ad fetched | |
// The FlurryAd object contains all of the ad assets | |
} | |
// Informational callback invoked when there is an ad error | |
func adNative(nativeAd: FlurryAdNative!, adError: FlurryAdError, errorDescription: NSError!){ |
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
let nativeAd = FlurryAdNative(space: "ADSPACE"); | |
nativeAd.adDelegate = self; | |
nativeAd.viewControllerForPresentation = self; | |
nativeAd.fetchAd(); | |
nativeAd.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
if adInterstitial != nil && adInterstitial.ready { | |
adInterstitial.presentWithViewController(self); | |
} else { | |
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
// ViewController.swift | |
class ViewController: UIViewController, FlurryAdInterstitialDelegate { | |
let adInterstitial = FlurryAdInterstitial(space: "ADSPACE"); | |
override func viewDidAppear(animated: Bool) { | |
super.viewDidAppear(animated); | |
adInterstitial.adDelegate = self; | |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
var err: NSError? | |
// Log an error | |
Flurry.logError("ERROR_ID", "MESSAGE", exception: err); | |
// 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
// AppDelegate.swift | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
// A basic Flurry Event | |
Flurry.logEvent("Started Application"); | |
// Your code... | |
return true; | |
} |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
Flurry.startSession("YOUR_FLURRY_API_KEY"); | |
// Your code... | |
return true; | |
} |