Reputation: 4744
I'm using Google Ads for my mobile app. Some of reasons ads doens't appear to app.
GoogleService-Info.plist is installed.
UPDATES :I created Admob Payment İnformation and updated simulator version 10.0 to 12.0 and this problem solved.
I added this 2 lines into my info.plist but didn't work :
<key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
<string>NO</string>
<key>FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED</key>
<string>YES</string>
My AppDelegate.swift :
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
GADMobileAds.configure(withApplicationID: "My Firebase App id")
}
My ViewController.swift :
@IBOutlet weak var vieww: GADBannerView! // There is a view that GADBannerView Class
override func viewDidLoad() {
super.viewDidLoad()
let request = GADRequest()
request.testDevices = [kGADSimulatorID]
vieww.adUnitID = "Banner ID from Admob"
vieww.rootViewController = self
vieww.load(request)
}
Debug screen :
5.15.0 - [Firebase/Analytics][I-ACS023049] Analytics is disabled. Event not logged
Upvotes: 1
Views: 1354
Reputation: 11
Just wondering if anyone ever came up with a concrete solution for this, as I am in contact with the Firebase team troubleshooting this same issue on my own app that was hoping to push to beta this week, but am still waiting for a fix for this, as I really want to get Analytics working first. Unfortunately, none of the proposed fixes have turned up anything for me. I have payment options setup for AdMob, and interestingly, AdMob has been working just fine in my testing, but Analytics still wont. I have tried removing the app entirely from Firebase and starting with a from scratch with Firebase, but the issue still remains. I have also tried adjusting the plist file entry IS_ANALYTICS_ENABLED to both yes and no, and still same results. I have tried removing the GoogleService-Info.plist file and using the one AdMob generates and also the one Firebase generates, but no dice either way. I have also tried to add.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
AnalyticsConfiguration.shared().setAnalyticsCollectionEnabled(true)
GADMobileAds.configure(withApplicationID: "id number")
}
Nothing has worked. Any ideas??????
Here is an example of what I see in my logs in XCode:
[Firebase/InstanceID][I-IID023000] No info is retrieved from Keychain OSStatus: -25300 with the keychain query
5.16.0 - [Firebase/Analytics][I-ACS023049] Analytics is disabled. Event not logged
[Firebase/InstanceID][I-IID023002] Couldn't delete item from Keychain
After hours long troubleshooting this. I figured it out. I had found a post that the had the answer, but thought it was referring to GoogleService-Info.plist and not the regular info.plist file, but the problem isn't with GoogleService one, its in the info.plist that is built into every iOS app, which I am guessing Firebase adds two entries to when it installs. This was the problem entry. enter image description here
It needs to be set to NO to work correct, but probably defaults to NO for security reasons. Google needs to update Firebase Docs to reflect this change, but haven't yet. I will pass this onto the engineer I'm in contact with. Hope this helps someone else too.
Upvotes: 1
Reputation: 2666
In declaration of your ViewController
do you conform to GADBannerViewDelegate?
class ViewController: UIViewController, GADBannerViewDelegate {
Upvotes: 0