-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added getSessionId #165
added getSessionId #165
Conversation
I didn't bump version or edit changelog - I can if you'd like, but I figured that'd be you folks' department. It'd be nice for this to get deployed with new version so spm would pull it down right away... |
Also, not quite sure which tests you'd want... brand new one? Shoehorn into "identify sets distinct and anon Ids"? How would it be done? |
@objc public func getSessionId() -> String { | ||
if !isEnabled() { | ||
return "" | ||
} | ||
|
||
return sessionLock.withLock { | ||
return sessionId ?? "" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@objc public func getSessionId() -> String { | |
if !isEnabled() { | |
return "" | |
} | |
return sessionLock.withLock { | |
return sessionId ?? "" | |
} | |
} | |
@objc public func getSessionId() -> String? { | |
if !isEnabled() { | |
return nil | |
} | |
return sessionLock.withLock { | |
return sessionId | |
} | |
} |
@colin-persona thanks for the PR. |
@colin-persona you can run |
closed in favor of #170 |
💡 Motivation and Context
I need your sessionId to help correlate your events with my own server events.
#164
💚 How did you test it?
In my app.
📝 Checklist
NOTE: The code I wrote is this:
which would have been better as this (return optional, use guard), but I did the above to match your other similar functions...
Anyway, this will help me, thanks!