Im in Swift and every time I call them delegate func didFailWithError called. I use the same code that I use for facebook cross-site ads in all my applications and it works fine except for this new application that I created. Ads do not appear, and I get a message on my console saying:
DiskCookieStorage changes the policy from 2 to 0, cookie: File: ///private/var/mobile/Containers/Data/Application/4E5FA239-208C-4B08-87C6-E4DB1CC3CC76/Library/Cookies/Cookies.binarycookies
This is how I customize the code in my GameViewController:
import UIKit import SpriteKit let interstitialFBAD: FBInterstitialAd = FBInterstitialAd(placementID: "2320559454634478_1321860725967683") class GameViewController: UIViewController, FBInterstitialAdDelegate { override func viewDidLoad() { super.viewDidLoad() if let scene = GameScene(fileNamed:"GameScene") { loadFBInterstitialAd() } } //fbAds-------------------------------------------------------------------------------------------------------- func loadFBInterstitialAd() { interstitialFBAD.delegate = self interstitialFBAD.load() print("what") } func interstitialAdDidLoad(_ interstitialAd: FBInterstitialAd) { interstitialFBAD.show(fromRootViewController: self) print("popup") } func interstitialAd(_ interstitialAd: FBInterstitialAd, didFailWithError error: Error) { print("failed") } //fbAds--------------------------------------------------------------------------------------------------------
xcode swift interstitial facebook-audience-network
coding22
source share