-
Notifications
You must be signed in to change notification settings - Fork 194
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: Swift UserId and DeviceId setter #299
Conversation
Sources/Amplitude/Amplitude.h
Outdated
Sets the userId. | ||
Sets the userId and starts a new session. | ||
|
||
**Note: this is deprecated** - please use `setUserId:(NSString*) userId startNewSession:(BOOL)startNewSession` |
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.
no space in between for (NSString*) userId
@@ -87,6 +87,8 @@ @interface Amplitude() | |||
@property (nonatomic, assign) long long sessionId; | |||
@property (nonatomic, assign) BOOL backoffUpload; | |||
@property (nonatomic, assign) int backoffUploadBatchSize; | |||
@property (nonatomic, copy, readwrite, nullable) NSString *userId; |
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.
This will allow user to call setter without changing readonly
for userId
and deviceId
inside Amplitude.h
?
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.
Changed so readwrite occurs in header instead of implementation
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.
Will revert so that we can solve the method syntax bug
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.
@jooohhn You can merge if you verified 2 things-
- Custom setter will be called.
- Setter can both be accessed in objc and swift.
This reverts commit 30c6f02.
## [7.1.1](v7.1.0...v7.1.1) (2020-10-20) ### Bug Fixes * **buildsettings:** Remove override for GCC_WARN_INHIBIT_ALL_WARNINGS ([#302](#302)) ([0e55297](0e55297)) * **deprecation warnings:** Fix deprecation warnings ([#301](#301)) ([e7b0e6e](e7b0e6e)), closes [/github.com//issues/250#issuecomment-655224554](https://github.com//github.com/amplitude/Amplitude-iOS/issues/250/issues/issuecomment-655224554) * **deprecations:** Use DEPRECATED_MSG_ATTRIBUTE instead of notes ([#305](#305)) ([f501c6c](f501c6c)) * nil dynamic config refresh crash ([#288](#288)) ([#289](#289)) ([9dc896d](9dc896d)) * Swift UserId and DeviceId setter ([#299](#299)) ([b7c0f90](b7c0f90))
Summary
Amplitude.m
to fix usage in SwiftsetUserId(userId)
forsetUserId(userId, startNewSession)
Checklist