name = "analytics"
summary = "Analytics + crash reporting (Firebase Analytics + Crashlytics) — free, bundled (EXPERIMENTAL)"
notes = [
"EXPERIMENTAL: the Firebase round-trip isn't device-tested in CI (no Firebase project / config files committed). Verify on a real device with your own Firebase project.",
"iOS: drop GoogleService-Info.plist into iOS/Sources/ — Firebase reads it at FirebaseApp.configure(). It carries your project keys and can't be bundled. WITHOUT it the plugin stays inert (ops return ok:false; the app does NOT crash).",
"Android: drop google-services.json into Android/app/ — the google-services Gradle plugin reads it at build time and the BUILD FAILS without it.",
"iOS crash symbolication: Crashlytics CAPTURES crashes without extra setup, but for symbolicated (readable) reports add a Run Script build phase that runs the Firebase 'upload-symbols'/'run' script over your dSYMs (see the Crashlytics docs). Not automated by this plugin.",
"If you also install push-firebase-only, both share one FirebaseApp.configure() (guarded) + one google-services config — no conflict.",
]
[android]
sources = ["android/AnalyticsPlugin.kt"]
register = '"analytics" to AnalyticsPlugin(application)'
gradle_deps = [
"com.google.firebase:firebase-analytics:22.1.2",
"com.google.firebase:firebase-crashlytics:19.2.1",
]
gradle_plugins = [
"com.google.gms.google-services:4.4.2",
"com.google.firebase.crashlytics:3.0.2",
]
[ios]
sources = ["ios/AnalyticsPlugin.swift"]
register = 'case "analytics": return await AnalyticsPlugin.handle(op: op, input: input)'
app_launch = ["AnalyticsPlugin.bootstrap()"]
spm_packages = [
"Firebase|https://github.com/firebase/firebase-ios-sdk|11.6.0|FirebaseAnalytics",
"Firebase|https://github.com/firebase/firebase-ios-sdk|11.6.0|FirebaseCrashlytics",
]