Use of unresolved identifier 'AnalyticsEventScreenView' in Swift Firebase Analytics

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-24 18:41:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!