问题
I am working on iOS application and for tracking user events I am using Firebase analytics. I have installed it by pod
pod 'Firebase/Analytics'
But for tracking events I am getting them by following code
Analytics.logEvent("Sign_up_tapped", parameters:["SCREEN_NAME":"SIGN UP"])
But, I am trying to get screen name/View/Class. So, I have tried following code, But throwing compile errors
Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "Signup Screen",
AnalyticsParameterScreenClass: "Signup view"])
Errors are below
Use of unresolved identifier 'AnalyticsEventScreenView'
Use of unresolved identifier 'AnalyticsParameterScreenName'
https://firebase.google.com/docs/analytics/screenviews#swift
Any suggestions?
来源:https://stackoverflow.com/questions/65843488/use-of-unresolved-identifier-analyticseventscreenview-in-swift-firebase-analyt