Analytics
LaunchSwift includes an analytics abstraction and TelemetryDeck integration types in Core/Analytics.
ios/SwiftLaunch/Core/Analytics/AnalyticsEvent.swift— event enum + event name/parameter mappingios/SwiftLaunch/Core/Analytics/AnalyticsService.swift— protocol and concrete implementations
Analytics API
Section titled “Analytics API”protocol AnalyticsServiceProtocol: Sendable { func track(event: AnalyticsEvent)}
struct NoOpAnalyticsService: AnalyticsServiceProtocol { ... }struct TelemetryDeckAnalyticsService: AnalyticsServiceProtocol { ... }TelemetryDeckAnalyticsService initializes TelemetryDeck in init(appID:) and sends events via TelemetryDeck.signal.
Event enum (current source)
Section titled “Event enum (current source)”enum AnalyticsEvent: Sendable { case appLaunched case onboardingCompleted case onboardingSkipped case authSignedIn(method: String) case authSignedOut case paywallViewed case purchaseCompleted(product: String) case purchaseRestored case aiMessageSent(model: String) case aiConversationCleared case settingsViewed case languageChanged(to: String)}Each case maps to a stable name and optional parameters dictionary in AnalyticsEvent.swift.
Current wiring status
Section titled “Current wiring status”AppConfig.swiftdoes not define atelemetryDeckAppIDproperty.LaunchSwiftApp.swiftdoes not currently instantiate or inject an analytics service.- There is no analytics
EnvironmentKeyhelper in the current codebase.
So today, analytics primitives are present, but app-wide injection/event wiring is not yet implemented in production app flow code.
Example usage with current APIs
Section titled “Example usage with current APIs”let analytics: any AnalyticsServiceProtocol = TelemetryDeckAnalyticsService(appID: "YOUR-TELEMETRYDECK-APP-ID")
analytics.track(event: .appLaunched)analytics.track(event: .authSignedIn(method: "apple"))