Use PostHogConfig(projectToken:host:) instead of the deprecated init

PostHog deprecated `init(apiKey:host:)` in favour of `init(projectToken:host:)`.
The project token is the same value as the old API key, so this is a label-only
swap with no behaviour change.
This commit is contained in:
Stefan Ceriu
2026-06-23 11:57:44 +03:00
parent 122a0052ae
commit 89de0f3f2b
@@ -10,7 +10,7 @@ import PostHog
extension PostHogConfig {
static func standard(analyticsConfiguration: AnalyticsConfiguration) -> PostHogConfig? {
let postHogConfiguration = PostHogConfig(apiKey: analyticsConfiguration.apiKey, host: analyticsConfiguration.host)
let postHogConfiguration = PostHogConfig(projectToken: analyticsConfiguration.apiKey, host: analyticsConfiguration.host)
// We capture screens manually
postHogConfiguration.captureScreenViews = false
postHogConfiguration.surveys = false