-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: add setSessionId() method #95
Conversation
Thanks @falconandy. I agree the current usage is pretty clunky. A couple options:
I like that #2 as it's a smaller footprint, but I think #1 is easier to understand. I am leaning towards #1, or both. Wdyt? |
@justin-fiedler Parameter naming (wdyt?): |
Thanks @falconandy! I thought about this more and discussed with the team. We feel that option 2 is the way to go for these reasons
TLDR; Can you please
Thank you! |
@justin-fiedler |
Thanks @falconandy for this case I believe customers can use |
@justin-fiedler
Right now usual session logic works:
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary
Adds
setSessionId()
method.Typical usage is
amplitude.setSessionId(timestamp: Int64(NSDate().timeIntervalSince1970 * 1000))
Maybe it makes sense to add:
startNewSession()
(without any parameters, the same assetSessionId(timestamp: Int64(NSDate().timeIntervalSince1970 * 1000))
)endCurrentSession()
to end the current session but do not start new session. Can be used in clientLog Out
logic. Maybe it can be used inside SDKreset()
method.Checklist