Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
454 views
in Technique[技术] by (71.8m points)

ios - Use of unresolved identifier 'AnalyticsEventScreenView' in Swift Firebase Analytics

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?

enter image description here

question from:https://stackoverflow.com/questions/65843488/use-of-unresolved-identifier-analyticseventscreenview-in-swift-firebase-analyt

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have tried pod update Firebase/Analytics, Also pod update FirebaseAnalytics but, both not get updated versions.

So, Finally did pod update in terminal, And it is get updated version of Firebase Analytics and then issue resolved.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...