5.35.0
Minor Changes
-
2087837: Add push notification support so PostHog Workflows can target Flutter apps: device tokens register automatically on iOS and Android, notification opens are captured as
$push_notification_opened, andregisterPushNotificationToken,unregisterPushNotificationToken, andcapturePushNotificationOpenedcover the refresh and warm-start paths auto-detection cannot see.Both are enabled by default. An app that already has push configured (for example via
firebase_messaging) starts sending its device token to PostHog after this upgrade with no code change. SetcapturePushNotificationSubscriptions: falseorcapturePushNotificationOpened: falseonPostHogConfigto opt out. Apps initialized viacom.posthog.posthog.AUTO_INITopt out with thecom.posthog.posthog.CAPTURE_PUSH_NOTIFICATION_SUBSCRIPTIONS/com.posthog.posthog.CAPTURE_PUSH_NOTIFICATION_OPENEDkeys instead (Info.plist on iOS, AndroidManifest<meta-data>on Android), since the Dart-side config does not apply once the native SDK is already set up.pushIdentityProvideris a Dart callback, so it has no Info.plist or manifest equivalent: apps usingcom.posthog.posthog.AUTO_INITmust set it tofalseand callPosthog().setup(), otherwise the provider is never installed.