-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
In Firebase Analytics, they expect you to manually logEvent for each screen in your app. (They had some automagical screen view detection for UIKit and Android Activities, but not for SwiftUI or Jetpack Compose.)
On iOS, Google has provided a View extension to make tracking screens a little bit more convenient. It would be really handy for skip-firebase to bridge this API. Today, when I try to use it, I get a "Skip is unable to match this API call" error in my Skip Lite app. It would be great if skip-firebase were to bridge this API.
https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseAnalytics/README.md
Before
struct ContentView: View { var body: some View { Text("Hello, world!") // Logging screen name with class and a custom parameter. .onAppear { Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "main_content", AnalyticsParameterScreenClass: "ContentView", "my_custom_param": 5]) } // OR Logging screen name only. .onAppear { Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "main_content"]) } } }After
struct ContentView: View { var body: some View { Text("Hello, world!") // Logging screen name with class and a custom parameter. .analyticsScreen(name: "main_content", class: "ContentView", extraParameters: ["my_custom_param": 5]) // OR Logging screen name only, class and extra parameters are optional. .analyticsScreen(name: "main_content") } }
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed