Skip to content
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

Merged
merged 4 commits into from
Oct 26, 2018

Conversation

davidtruong
Copy link
Contributor

Attempts to create a user profile when the userId is set.

@@ -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"))

Copy link
Contributor

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.

@tapashmajumder tapashmajumder force-pushed the feature/ITBL-6230-call-createUserForUserId branch from afd0ef1 to 59c3f30 Compare October 23, 2018 00:27
@codecov-io
Copy link

codecov-io commented Oct 23, 2018

Codecov Report

Merging #28 into master will decrease coverage by <.01%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
swift-sdk/Internal/IterableAPIInternal.swift 89.05% <88.88%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc55e5...e27975d. Read the comment docs.

@@ -221,6 +236,15 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol {
}
}

func createUser(withUserId userId: String, onSuccess: OnSuccessHandler?, onFailure: OnFailureHandler?) {
Copy link
Contributor

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

@tapashmajumder tapashmajumder merged commit b9414a3 into master Oct 26, 2018
@tapashmajumder tapashmajumder deleted the feature/ITBL-6230-call-createUserForUserId branch November 2, 2018 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants