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

Dispatch AVCaptureDevice.requestAccess completion to the main queue #293

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

mattrubin
Copy link
Owner

This fixes a bug where the "needs permission" message would not appear correctly on the camera view immediately after the user denied access to the camera.

From the AVCaptureDevice.requestAccess documentation:

The completion handler is called on an arbitrary dispatch queue. It is the client's responsibility to ensure that any UIKit-related updates are called on the main queue or main thread as a result.

This fixes a bug where the "needs permission" message would not appear correctly on the camera view immediately after the user denied access to the camera.
From the AVCaptureDevice.requestAccess documentation: "The completion handler is called on an arbitrary dispatch queue. It is the client's responsibility to ensure that any UIKit-related updates are called on the main queue or main thread as a result."
@mattrubin mattrubin added this to the 2.1 milestone Sep 27, 2018
@mattrubin mattrubin added the bug label Sep 27, 2018
@codecov
Copy link

codecov bot commented Sep 27, 2018

Codecov Report

Merging #293 into develop will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #293      +/-   ##
==========================================
- Coverage    38.34%   38.3%   -0.05%     
==========================================
  Files           40      40              
  Lines         1870    1872       +2     
==========================================
  Hits           717     717              
- Misses        1153    1155       +2
Impacted Files Coverage Δ
Authenticator/Source/QRScanner.swift 3.92% <0%> (-0.17%) ⬇️

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 8cc2dc7...5ad284c. Read the comment docs.

@mattrubin mattrubin merged commit 0a6641d into develop Sep 27, 2018
@mattrubin mattrubin deleted the scanner-access-completion-queue branch September 27, 2018 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant