Skip to content

Commit 0b3b920

Browse files
authored
Remove erroneous assertion (#34)
#31 adjusted the assertion during sending errors back, and reintroduced the data race from canceling the autofill request due to starting a modal one (explicitly returning a failure to the continuation, clearing it out, and canceling the authController - which went back to sendError) This removes the assertion, since it was logically unsound, not to mention unhelpful. I've done another bunch of manual testing in a sample app and can no longer reproduce the issue. I'm not sure how to cover this in automated tests to prevent another regression, but I'll file a ticket in case someone finds a way.
1 parent 1613bd0 commit 0b3b920

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Sources/SnapAuth/SnapAuth+ASACD.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ extension SnapAuth: ASAuthorizationControllerDelegate {
4040

4141
/// Sends the error to the appropriate delegate method and resets the internal state back to idle
4242
private func sendError(_ error: SnapAuthError) {
43-
// One or the other should eb set, but not both
44-
assert(continuation != nil)
4543
continuation?.resume(returning: .failure(error))
4644
continuation = nil
4745
}

0 commit comments

Comments
 (0)