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

fix: calls ui apis on main thread #124

Merged
merged 2 commits into from Mar 22, 2018
Merged

Conversation

sandmman
Copy link
Contributor

Closes #123 moving this onto development.

Provides a fix for #869.

Issue

Updating UI apis from the background thread results in undefined behavior. This address the problem by moving the calls onto the main queue in the methods async block.

Testing

Ran a local iOS project using a local pod of BluemixAppID with xcode 9.

@sandmman sandmman force-pushed the issue.uiBackgroundThread branch 2 times, most recently from a7f2797 to f38a47c Compare March 21, 2018 20:10
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 82.067% when pulling 222f242 on issue.uiBackgroundThread into d924cf4 on development.

@sandmman
Copy link
Contributor Author

sandmman commented Mar 22, 2018

@vitalymibm It turns out that our tests will almost always fail during peak hours on travis. It seems like a race condition exists between the simulator and our test cases that is exposed during slow cpu availability. I've been playing around with a couple fixes and will open another PR if one works. In any case, tests now pass.

Travis also no longer supports xcode 8.1, so I bumped the docs and travis to 8.3.

For the code coverage, I'm not sure why it doesn't count the lines in the DispatchQueue async code block when they clearly are called and do get counted by xcode's code coverage. Rather than add an arbitrary test case for some other unrelated block of code to offset the 0.4%, I think its best to leave it as is.

@vitalymibm
Copy link
Collaborator

@sandmman Ok, thank you for the info. I merged the PR.

@vitalymibm vitalymibm merged commit 54770bf into development Mar 22, 2018
@sandmman sandmman deleted the issue.uiBackgroundThread branch March 22, 2018 12:29
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

3 participants