FaceBook Native ads is not loading in iOS? - ios

I am trying to implement Facebook native ads on my device. Test ads are working fine. However, production ads are not showing. It does displays an error showing
DiskCookieStorage changing policy from 2 to 0,cookie file: file:///private/var/mobile/Containers/Data/Application/9B89E486-EDF8-4E20-A7CE-CB60747C3E8B/Library/Cookies/Cookies.binarycookies
and
DiskCookieStorage changing policy from 0 to 2, cookie file: file:///private/var/mobile/Containers/Data/Application/9B89E486-EDF8-4E20-A7CE-CB60747C3E8B/Library/Cookies/Cookies.binarycookies
What I did is loading the ads in viewdidLoad
func setupFacebookNativeAds()
{
let nativeAd = FBNativeAd(placementID: Constants.adMob.FB_NATIVE_ID)
nativeAd.delegate = self
nativeAd.loadAd()
}
What will be the issue here?

I found a solution by adding new test devices in the Monetisation Manager. Get the IDFA for the ios devices and add new test devices. Now the Native Ads view is working.

Related

Why am I getting a AXServer error when sharing data via Snapchat SDK?

I am using the example xcode project for sharing media between my app and Snapchat directly. I have successfully authenticated my app by this point (it loads bitmoji + user info and I can print the access token). The code that causes the error is invoked after the UIPicker has selected an image:
from line 38 of MediaPickerViewController.swift
fileprivate func shareImage(image: UIImage) {
let snapPhoto = SCSDKSnapPhoto(image: image)
let snapContent = SCSDKPhotoSnapContent(snapPhoto: snapPhoto)
// Send it over to Snapchat. This produced the error below
snapAPI.startSending(snapContent)
}
Then when you pick an image from the gallery:
2020-03-23 17:49:54.487603-0700 CreativeKitSample[20966:5903027]
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:
Permission denied portName:'com.apple.iphone.axserver' PID:20969
This is running on my iPhone, debugging over USB. I'm new to Swift development, and my best guess is that my app is developer certificate signed, perhaps it is sandboxed on iOS 13 from communication with prod apps? Or is the AXServer more of a Core UI thing or Accessibility? This project uses Interface Builder/Storyboards. I tried disabling accessibility checkbox on UI elements. I'm at a loss here, searching for AXServer permission errors has not been useful.
some AX errors:
https://github.com/TimOliver/TOCropViewController/issues/402
https://forums.developer.apple.com/thread/120696 (clue that it may be inter-app permission)
https://bugs.webkit.org/show_bug.cgi?id=203618 (sandbox extension?)
I'm an idiot. When I created my Apple Developer Cert and Provisioning Profile, I had a collision with the package identifier, so I changed it in the provisioning settings but neglected to update the snapchat portal's bundle ID. Leaving the question here for anyone else with the same problem.
They could make their error a bit more descriptive...
I got maybe a solution... I'm dismissing before the current View Controller, then present the SFSafariViewController.
Using following Code does help me out! (Xcode 11.3.1, macOS 10.14.6, iOS 13.3)
DispatchQueue.main.async(execute: {
// code goes here
})
// my solution...
DispatchQueue.main.async {
self.present(safariVC, animated: true, completion: nil)
}

Admob RewardedVideo via Firebase

i know this kind of question has been asked a lot but i've tried everything out there and cannot find what is going on.
I'm not using mediation and I have no troubles showing Interstitial. Here is my configuration:
class MainContainerViewController: UIViewController, GADInterstitialDelegate, GADRewardBasedVideoAdDelegate {
var rewardBasedVideo: GADRewardBasedVideoAd?
override func viewDidLoad() {
super.viewDidLoad()
...
rewardBasedVideo = GADRewardBasedVideoAd.sharedInstance()
rewardBasedVideo?.delegate = self
let request = GADRequest()
request.testDevices = ["b8d6d8f423b67dc1855d953466503d0d"]
rewardBasedVideo?.load(request, withAdUnitID: "ca-app-pub-3872067921404234/2000937302")
}
func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd, didFailToLoadWithError error: Error) {
NSLog("didFailToLoad \(error.localizedDescription)")
}
}
I've tried loading AdUnitID for testing with no success and the log everytime i tried to load a new rewarded video is showing:
<Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.
didFailToLoad No ad returned from any ad server.
Any help would be great. Thanks in advance,
//EDIT
Could it be related with device size? I've tested on simulator and it works fine but on iPhone 7plus the result is the one showed above. Anyone can confirm this???
Make sure to install the Adapter SDK, Firebase SDK correctly and link them correctly in the BuildPhases -> Link Binary with Libraries. Also add the search paths as mentioned in the docs. The error means that either there is no ad to display or you're receiving a faulty Ad. I checked your Ad Unit ID with sample apps and everything works fine. Check your implementation and Pod installation again.

Google Admob ads not showing up in Swift 3 iOS App

Hi I have been trying to load Google Admob ads by following this tutorial in my Swift 3 app. I did all the steps and my project is running successfully. Here is how I am doing this
GoogleBannerView.adUnitID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GoogleBannerView.rootViewController = self
GoogleBannerView.load(GADRequest())
While running the app on simulator, I see nothing. App log is here

App crashes if PaywithCard is selected in PayPalPaymentViewController [Paypal iOS SDK]

I have integrated paypal's payment gate way in my app and I have added all the neccessary sdks and libraries. When I enable acceptCreditCards option in paypal configuration, app crashes as soon as user tries to tap on PaywithCard option.
Crash Log:
'Application tried to present a nil modal view controller on target <PayPalPaymentViewController: 0x7fce3029f200
Environment: sandbox
languageOrLocale: en-US
>
I even tried enabling PaywithCard in paypal's sample app and observed the same behaviour.I'm using Xcode 8, swift 3 and
I have added card.io SDK and cleaned the app before running.Now app works as expected.

Getting Error "Request Error: No ad to show" in AdMob Native ads iOS

I have developed native adMob in my application by coping code from Sample Application given by google from below URL https://github.com/googleads/googleads-mobile-ios-examples/tree/master/Objective-C/admob/NativeExample
I am getting: Error by using my AdUnitID: failed with error: Request Error: No ad to show.
But when i use test key given in Google sample app than my application native ads are working fine.
So What is the problem with my native Ad unitId ?
Google Native AdUnitID : ca-app-pub-3940256099942544/3986624511 My App Native AdUnitID : ca-app-pub-3415315092173981/2210049154
Update: When i put "testDevices" with my application UnitID than my application native ads are working fine. but when i remove "testDevices" than getting same error.
Try with the ad unit ID for testing: ca-app-pub-3940256099942544/2562852117
Also, if the height is too small, then there will be no ads too. For a "small" ad, I have to set to 140 height for it to show up.
Usually if there are no ads it will give error that no ads are available.

Resources