Why doesn't my Facebook interstitial ads appear in my application?

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-------------------------------------------------------------------------------------------------------- 
+7
xcode swift interstitial facebook-audience-network
source share
1 answer

So from

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:

It seems like my first solution is not the answer, but it is so obvious that I have to point to it nonetheless: from Facebook docs it seems that there are several steps to create an application that can use the SDK correctly (namely, creating an application on Facebook and using the correct Info.plist keys Info.plist etc.).

If this is not what is happening, I think it is not, but it is all the same because the application is not configured properly, but for some reason other than the Facebook SDK.

Not seeing how you initialize the SDK in your AppDelegate and confirm that these are not Info.plist tags that are missing for the ads you are trying to show, it's hard to say what the problem is. Have you contacted Facebook support? They could definitely help here. Somewhere off this page. I’m sure that you can find the support you need in real time as a payment announcement client.

+3
source share

All Articles