-
Notifications
You must be signed in to change notification settings - Fork 71
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
Feature/itbl 6229 call create user for user #28
Feature/itbl 6229 call create user for user #28
Conversation
@@ -53,6 +53,7 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol { | |||
_userId = newValue | |||
_email = nil | |||
storeEmailAndUserId() | |||
createUserForUserId(onSuccess: IterableAPIInternal.defaultOnSucess(identifier: "createUserForUserId"), onFailure: IterableAPIInternal.defaultOnFailure(identifier: "createUserForUserId")) | |||
|
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.
We should probably wait for the call to createUserForUserId to finish before calling enableDevice. That way we know that the user exists before enabling the device. Also adding a unit test would be good.
afd0ef1
to
59c3f30
Compare
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
==========================================
- Coverage 90% 89.99% -0.01%
==========================================
Files 25 25
Lines 1020 1029 +9
==========================================
+ Hits 918 926 +8
- Misses 102 103 +1
Continue to review full report at Codecov.
|
@@ -221,6 +236,15 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol { | |||
} | |||
} | |||
|
|||
func createUser(withUserId userId: String, onSuccess: OnSuccessHandler?, onFailure: OnFailureHandler?) { |
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.
Let's make it private
Attempts to create a user profile when the userId is set.