Summary
Push token registration works end to end (device token registers, Workflows pushes deliver via the APNs channel), but $push_notification_opened is never captured when the user taps a delivered push — on neither warm start (app backgrounded) nor cold start (app force-quit). Application Opened and the rest of the session capture normally, so it isn't a flush/ingestion issue: the open event simply never fires.
Environment
posthog_flutter 5.39.0 (native posthog-ios resolved via the podspec pin >= 3.70.0, < 4.0.0)
- Flutter (stable), iOS device build distributed via TestFlight
flutter_local_notifications 22.x in the same app — it calls UNUserNotificationCenter.current().delegate = self during its initialize() (used for locally scheduled reminders)
- PostHog config: defaults —
enableSwizzling, capturePushNotificationSubscriptions, capturePushNotificationOpened all true; EU instance
- Push sent through a PostHog Workflows
function_push step over a connected APNs channel (so title/body should be attachable)
Repro
- App with both
posthog_flutter 5.39.0 and flutter_local_notifications 22.x initialized (FLN sets the UNUserNotificationCenter delegate).
- Register device token via the automatic subscription path (works — token registers,
$device_push_subscription_<bundle_id> person property appears).
- Send a push via a Workflows push step (delivery confirmed: "Push notification accepted by APNs" in workflow logs; notification arrives).
- Tap the notification — tested both with the app backgrounded and fully force-quit.
Expected: $push_notification_opened captured.
Actual: no $push_notification_opened ever appears (project-wide count is zero). Application Opened from the same tap session arrives normally.
Suspicion
Reading PushNotificationPublisher in posthog-ios, the swizzling covers both the delegate-setter and an already-set delegate's userNotificationCenter(_:didReceive:withCompletionHandler:), so the FLN pairing looks like it should be handled — but with FLN as the delegate the response never reaches the publisher in practice. The Flutter changelog for the push release notes that the manual capturePushNotificationOpened API exists for "paths auto-detection cannot see"; in this configuration that appears to be all paths.
Happy to test a fix or provide more detail (delegate setup order, timestamps, workflow/invocation IDs) if useful.
Summary
Push token registration works end to end (device token registers, Workflows pushes deliver via the APNs channel), but
$push_notification_openedis never captured when the user taps a delivered push — on neither warm start (app backgrounded) nor cold start (app force-quit).Application Openedand the rest of the session capture normally, so it isn't a flush/ingestion issue: the open event simply never fires.Environment
posthog_flutter5.39.0 (native posthog-ios resolved via the podspec pin>= 3.70.0, < 4.0.0)flutter_local_notifications22.x in the same app — it callsUNUserNotificationCenter.current().delegate = selfduring itsinitialize()(used for locally scheduled reminders)enableSwizzling,capturePushNotificationSubscriptions,capturePushNotificationOpenedall true; EU instancefunction_pushstep over a connected APNs channel (so title/body should be attachable)Repro
posthog_flutter5.39.0 andflutter_local_notifications22.x initialized (FLN sets the UNUserNotificationCenter delegate).$device_push_subscription_<bundle_id>person property appears).Expected:
$push_notification_openedcaptured.Actual: no
$push_notification_openedever appears (project-wide count is zero).Application Openedfrom the same tap session arrives normally.Suspicion
Reading
PushNotificationPublisherin posthog-ios, the swizzling covers both the delegate-setter and an already-set delegate'suserNotificationCenter(_:didReceive:withCompletionHandler:), so the FLN pairing looks like it should be handled — but with FLN as the delegate the response never reaches the publisher in practice. The Flutter changelog for the push release notes that the manualcapturePushNotificationOpenedAPI exists for "paths auto-detection cannot see"; in this configuration that appears to be all paths.Happy to test a fix or provide more detail (delegate setup order, timestamps, workflow/invocation IDs) if useful.