Firebase iOS Debug Console not logging anything

后端 未结 9 1732
南旧
南旧 2021-01-01 21:25

I have setup firebase in both the console and in the app. Everything configures correctly, and events appear to be logging in the app.

Output to console:

<         


        
相关标签:
9条回答
  • 2021-01-01 22:07

    Make sure to add ONE DASH before -FIRDebugEnabled

    I wasted a whole day making silly mistake having missed that DASH

    Hope that doesn't happen to others!

    0 讨论(0)
  • 2021-01-01 22:10

    I made it possible by writing the following:

    func application(_ application: UIApplication, didFinishLaunchingWithOptions, ...) {
        // some other initialization
    
        FirebaseApp.configure()
        Firebase.Analytics.setAnalyticsCollectionEnabled(true)
    }
    
    0 讨论(0)
  • 2021-01-01 22:13

    Check if you have an ad blocker enabled while visiting the Firebase website.

    I had uBlock origin enabled and it would block every page (Dashboard, Events, StreamView, DebugView...) and they'd all be blank.

    Everything worked as expected as soon as I whitelisted it.

    0 讨论(0)
  • 2021-01-01 22:20

    Make sure to remove the OS_ACTIVITY_MODE:disable from the Environment Variables in your project scheme if you added it at some point.

    0 讨论(0)
  • 2021-01-01 22:23

    Try this , This is work for me ,

    Follow below steps ,

    1.In Xcode, select Product → Scheme → EditScheme.

    2.Select Run from left Menu and Select Arguments tab In the Arguments Passed on + option

    add -FIRDebugEnabled

    For detail debug view follow steps DebugView track Firebase doc

    To send an event in XCode project follow code below,

    Objective C

    [FIRAnalytics logEventWithName:@"share_image"
                        parameters:@{@"name": name, @"full_text": text}];
    

    Swift

    Analytics.logEvent("share_image", parameters: ["name": name, "full_text": text])
    

    For events log follow detail steps Log events in Application Firebase doc

    Hope this will help someone.

    0 讨论(0)
  • 2021-01-01 22:24

    Alternatively you can do that inside your AppDelegate:

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
    
        var newArguments = ProcessInfo.processInfo.arguments
        newArguments.append("-FIRDebugEnabled")
        ProcessInfo.processInfo.setValue(newArguments, forKey: "arguments")
        
    } 
    

    ---EXTRA---

    And just some thoughts:

    Regarding

    Firebase.Analytics.setAnalyticsCollectionEnabled(true)
    

    If we inspect the method:

    So it's kind of POINTLESS...

    0 讨论(0)
提交回复
热议问题