0

i am using FBAudienceNetwork for first time to load facebook ads.

when i tried to hit load ad function it's fine but it's not responding with success or error through delegates.

i am little bit confuse where it's broken. i tried with brakepoints but it didn't captured.

import FBAudienceNetwork

func loadAd(){
    let nativeAd = FBNativeBannerAd(placementID:AppConstats.fb_native_Ad)
    nativeAd.delegate = self
    nativeAd.loadAd()
}

//MARK: - FBNativeAdDelegate
func nativeBannerAdDidLoad(_ nativeBannerAd: FBNativeBannerAd) {
    self.nativeAd = nativeBannerAd
    if let previousNativeAd = self.nativeAd, previousNativeAd.isAdValid {
        previousNativeAd.unregisterView()
    }
    print("AD DATA",nativeBannerAd)
}

func nativeBannerAd(_ nativeBannerAd: FBNativeBannerAd, didFailWithError error: Error) {
    print("Native banner ad failed to load with error: \(error.localizedDescription)")
}

earlier i found one issue no fill in debug log. now it's also disappear.

what i am missing here?

Jatin
  • 92
  • 7

0 Answers0