posthog-ios icon indicating copy to clipboard operation
posthog-ios copied to clipboard

adding appGroupIdentifier makes the events not show on dashboard

Open r-a-o opened this issue 3 weeks ago • 3 comments

Version

3.35.0

Steps to Reproduce

  • I integrated PostHog to my main SwiftUI app, it worked well.
  • I then wanted my UNNotificationServiceExtension extension to also log events, so made the config to include config.appGroupIdentifier.
  • After adding appGroupIdentifier, no event is showing up on dash, but client says "Events sent successfully"

Expected Result

  • expecting appGroupIdentifier to allow both main app and extension to sync events properly.

Actual Result

  • after adding appGroupIdentifier, events stopped showing up in dashboard. (Although client says "Events sent successfully.")

r-a-o avatar Nov 21 '25 04:11 r-a-o

Hey @r-a-o, do events stop showing up on the dashboard for both main target and notification extension? Do you see a log for capturing an event on both as well?

The fact that SDK client logs correctly makes me think that the sdk is doing its thing correctly so there must be something else going on here.

Can you open a ticket with us through our in-app support modal and link to this issue in the description? It will give us access to more information for your project

ioannisj avatar Nov 21 '25 05:11 ioannisj

Hi @ioannisj, that's right, both app + extension event stops showing on the dashboard after I add appGroupIdentifier.

Below is the client logs I see and it looks like its able to sync all local events:

Notification didReceive in NotificationServiceExtension

[PostHog] New session id created 019AA0FC-B1D8-7C77-A19E-20DB61211564 (sessionStart)
[PostHog] Integration PostHogAppLifeCycleIntegration installed
[PostHog] Integration PostHogSurveyIntegration installed

[PostHog]: notification_sent - ["Screen_Name": "", "notifSource": "FCM","Screen_Location": "'", "Location": "", "Value": "NudgeUserToReceive", "user_id": "019a9c2f-ee0d-7a3c-90e9-52cd07b9e1f3"] - usrp:nil - usrpso:nil

[PostHog] Queued event 'notification_sent'. Depth: 1
[PostHog] Sending batch of 1 events to PostHog
[PostHog] Remote config called successfully.
[PostHog] Events sent successfully.
[PostHog] Completed!
[PostHog] Flags called successfully.

Here is the support ticket: #43210 I tried this on my profile yesterday and then removed appGroupIdentifier from config to make it work again. Profile: /135889/persons/6d1fc378-facc-59b3-81bb-ca973973fa1c

Thanks!

r-a-o avatar Nov 21 '25 05:11 r-a-o

Thank you! Moved the conversation to the support ticket. Will post here any notable findings/highlights if needed

ioannisj avatar Nov 21 '25 08:11 ioannisj

Fixed with 3.35.1

More context in https://github.com/PostHog/posthog-ios/pull/402

ioannisj avatar Dec 08 '25 19:12 ioannisj