From 0bb301f3ad10fb4338ffea9abcc2f9b19b255269 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Sat, 2 Mar 2024 17:14:34 -0500 Subject: [PATCH 1/8] setup posthog following installation instructions --- flutter/android/app/src/main/AndroidManifest.xml | 7 +++++++ flutter/ios/Runner/Info.plist | 10 ++++++++++ flutter/macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ flutter/macos/Runner/Info.plist | 10 ++++++++++ flutter/pubspec.lock | 8 ++++++++ flutter/pubspec.yaml | 1 + flutter/web/index.html | 10 ++++++++-- 7 files changed, 46 insertions(+), 2 deletions(-) diff --git a/flutter/android/app/src/main/AndroidManifest.xml b/flutter/android/app/src/main/AndroidManifest.xml index 6e0ec92..62949c4 100644 --- a/flutter/android/app/src/main/AndroidManifest.xml +++ b/flutter/android/app/src/main/AndroidManifest.xml @@ -24,6 +24,13 @@ + + + + + + + UIApplicationSupportsIndirectInputEvents + + + com.posthog.posthog.API_KEY + phc_brFjanMrA2KXPYyvFjLdwJC9VJvl4VG7mG9yKqvgCCY + com.posthog.posthog.POSTHOG_HOST + https://app.posthog.com + com.posthog.posthog.CAPTURE_APPLICATION_LIFECYCLE_EVENTS + + com.posthog.posthog.DEBUG + diff --git a/flutter/macos/Flutter/GeneratedPluginRegistrant.swift b/flutter/macos/Flutter/GeneratedPluginRegistrant.swift index 92b6497..8d3b7ee 100644 --- a/flutter/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/flutter/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,12 +7,14 @@ import Foundation import app_links import path_provider_foundation +import posthog_flutter import shared_preferences_foundation import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + PosthogFlutterPlugin.register(with: registry.registrar(forPlugin: "PosthogFlutterPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/flutter/macos/Runner/Info.plist b/flutter/macos/Runner/Info.plist index 4789daa..81c7ed9 100644 --- a/flutter/macos/Runner/Info.plist +++ b/flutter/macos/Runner/Info.plist @@ -28,5 +28,15 @@ MainMenu NSPrincipalClass NSApplication + + + com.posthog.posthog.API_KEY + phc_brFjanMrA2KXPYyvFjLdwJC9VJvl4VG7mG9yKqvgCCY + com.posthog.posthog.POSTHOG_HOST + https://app.posthog.com + com.posthog.posthog.CAPTURE_APPLICATION_LIFECYCLE_EVENTS + + com.posthog.posthog.DEBUG + diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index 3a1dae6..f2b65f1 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -592,6 +592,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + posthog_flutter: + dependency: "direct main" + description: + name: posthog_flutter + sha256: c8dea2ac8b37e1b8296d86878a51df2b408b8efbde9b47d4cb94c4cb9a1187ea + url: "https://pub.dev" + source: hosted + version: "4.1.0" pub_semver: dependency: transitive description: diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index fa2a67a..2903788 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -42,6 +42,7 @@ dependencies: flutter_riverpod: ^2.4.10 riverpod_annotation: ^2.3.4 url_launcher: ^6.2.5 + posthog_flutter: ^4.1.0 dev_dependencies: flutter_test: diff --git a/flutter/web/index.html b/flutter/web/index.html index 27f3681..09c0733 100644 --- a/flutter/web/index.html +++ b/flutter/web/index.html @@ -23,13 +23,13 @@ - + - test + DevToDollars + + +