Skip to content

Instantly share code, notes, and snippets.

@yccheok
Created September 16, 2022 07:00
Show Gist options
  • Save yccheok/5018f19fcee7ee9f4ce7a487f474e623 to your computer and use it in GitHub Desktop.
Save yccheok/5018f19fcee7ee9f4ce7a487f474e623 to your computer and use it in GitHub Desktop.
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
FirebaseApp.configure()
// Not sure why. We need to call this function for first_open to be sent automatically.
// https://stackoverflow.com/questions/73600417/why-firebase-analytics-first-open-event-is-not-sent-automatically-unless-i-first
Analytics.setAnalyticsCollectionEnabled(true)
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment