Hello i have implemented flurry native ads in my ios app. But its delegate method is not called so could not display the ads. I have also downloaded the demo code from here. its working fine but same implementation is not working in my app. Below is my code. In this code none of the delegate method is called.
let nativeAd = FlurryAdNative(space: "Tester")
// var nativeAdsWanted = 3
// let adFetchRetryMaximum = 10
// var adFetchRetryCount = 0
// this list will hold ads that we have requested but are not ready
var pendingAdList: [FlurryAdNative] = []
// this list will hold our ready ads that will be dispalyed
var nativeAdList: [FlurryAdNative] = [] {
didSet {
print(nativeAdList)
}
}
override func viewDidLoad()
{
super.viewDidLoad()
self.initFlurryAds()
}
func initFlurryAds() {
var newAdsList : [FlurryAdNative] = []
//setting the ad delegate a view controller
nativeAd?.adDelegate = self
nativeAd?.viewControllerForPresentation = self
//fetching the ad from Flurry and then addding it to our list of new ads
nativeAd?.fetchAd()
print(nativeAd!)
newAdsList.append(nativeAd!)
}
func adNativeDidFetchAd(nativeAd: FlurryAdNative!){
print("Native Ad for Space \(nativeAd.space) Received Ad with \(nativeAd.assetList.count) assets");
nativeAdList.append(nativeAd)
}
// Informational callback invoked when there is an ad error
func adNative(nativeAd: FlurryAdNative!, adError: FlurryAdError, errorDescription: NSError!){
NSLog("Native Ad for Space \(nativeAd.space) Received Error \(adError), with description: \(errorDescription)")
}
func adNativeDidDismiss(_ nativeAd: FlurryAdNative!) {
}
func adNativeDidLogImpression(_ nativeAd: FlurryAdNative!) {
}
func adNativeWillPresent(_ nativeAd: FlurryAdNative!) {
}
func adNativeExpandToggled(_ nativeAd: FlurryAdNative!) {
}