diff --git a/iosApp/iosApp/Analytics/AnalyticsManager.swift b/iosApp/iosApp/Analytics/AnalyticsManager.swift index 1e86c43..89024b0 100644 --- a/iosApp/iosApp/Analytics/AnalyticsManager.swift +++ b/iosApp/iosApp/Analytics/AnalyticsManager.swift @@ -41,9 +41,8 @@ final class AnalyticsManager { let config = PostHogConfig(apiKey: Self.apiKey, host: Self.host) - // Person profiles — required so events create person records - // and appear in the PostHog Events Explorer / Activity view. - config.personProfiles = .always + // Anonymous-only — no user identification, events use anonymous IDs + config.personProfiles = .never // Auto-capture config.captureElementInteractions = true diff --git a/iosApp/iosApp/Login/LoginViewModel.swift b/iosApp/iosApp/Login/LoginViewModel.swift index dd93c7f..c2f77ef 100644 --- a/iosApp/iosApp/Login/LoginViewModel.swift +++ b/iosApp/iosApp/Login/LoginViewModel.swift @@ -146,8 +146,6 @@ class LoginViewModel: ObservableObject { // APILayer.logout clears DataManager try? await APILayer.shared.logout() - - SubscriptionCacheWrapper.shared.clear() PushNotificationManager.shared.clearRegistrationCache() diff --git a/iosApp/iosApp/iOSApp.swift b/iosApp/iosApp/iOSApp.swift index c0eef8c..a1862e3 100644 --- a/iosApp/iosApp/iOSApp.swift +++ b/iosApp/iosApp/iOSApp.swift @@ -45,8 +45,8 @@ struct iOSApp: App { TokenStorage.shared.initialize(manager: TokenManager.Companion.shared.getInstance()) if !UITestRuntime.isEnabled { - // Initialize PostHog Analytics - PostHogAnalytics.shared.initialize() + // Initialize PostHog Analytics (must use Swift AnalyticsManager, not the Kotlin stub) + AnalyticsManager.shared.configure() } // Initialize lookups at app start (public endpoints, no auth required)