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

Access sessionId

Open colin-persona opened this issue 1 year ago • 3 comments

Problem Statement

I want to get and use sessionId for my own purposes (correlating your sessions with my server data). But, it's private. Could you make an accessor, or public?

private var sessionId: String?

Solution Brainstorm

Make an accessor function.

colin-persona avatar Aug 14 '24 14:08 colin-persona

@colin-persona that is fine, would you like to open a PR and make a read-only getter?

marandaneto avatar Aug 14 '24 14:08 marandaneto

Yes. Yes I would, thanks! Here it is: https://github.com/PostHog/posthog-ios/pull/165

colin-persona avatar Aug 14 '24 15:08 colin-persona

I didn't add to change log or bump version... figured you should do that?

colin-persona avatar Aug 14 '24 15:08 colin-persona

done by https://github.com/PostHog/posthog-ios/pull/170

marandaneto avatar Sep 11 '24 11:09 marandaneto