-
Notifications
You must be signed in to change notification settings - Fork 14
Fix Swift compiler warnings #311
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,27 @@ final class AppleSignInWebService: ServiceAuthentication { | |
| @available(iOS 13.0, *) | ||
| func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { | ||
| let authorizationError = ASAuthorizationError(_nsError: error as NSError) | ||
| // Cases added after the SDK's iOS 14.2 deployment target. | ||
| // Each is referenced behind an availability check and mapped | ||
| // to the matching AuthenticationError case so callers can | ||
| // distinguish it from the generic .failed / .unknown bucket. | ||
| if #available(iOS 15.4, *), authorizationError.code == .notInteractive { | ||
|
Comment on lines
+44
to
+48
|
||
| completion(.failure(.notInteractive)) | ||
| return | ||
| } | ||
| if #available(iOS 18.0, *), authorizationError.code == .matchedExcludedCredential { | ||
| completion(.failure(.matchedExcludedCredential)) | ||
| return | ||
| } | ||
| if #available(iOS 18.2, *), authorizationError.code == .credentialImport { | ||
| completion(.failure(.credentialImport)) | ||
| return | ||
| } | ||
| if #available(iOS 18.2, *), authorizationError.code == .credentialExport { | ||
| completion(.failure(.credentialExport)) | ||
| return | ||
| } | ||
|
|
||
| switch authorizationError.code { | ||
| case .canceled: | ||
| completion(.failure(.userCanceled)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,13 +14,26 @@ import AuthenticationServices | |||||||||||||||||||||||||||||||||
| /// - invalidResponse: The response returned by the web service was invalid. | ||||||||||||||||||||||||||||||||||
| /// - notHandled: The error wasn't handled by the web service. | ||||||||||||||||||||||||||||||||||
| /// - presentationContextInvalid: The presentation content provided was invalid. | ||||||||||||||||||||||||||||||||||
| /// - notInteractive: The authorization request was performed in a | ||||||||||||||||||||||||||||||||||
| /// non-interactive context. Mirrors `ASAuthorizationError.notInteractive` | ||||||||||||||||||||||||||||||||||
| /// (iOS 15.4+). | ||||||||||||||||||||||||||||||||||
| /// - matchedExcludedCredential: A matched credential was excluded from use. | ||||||||||||||||||||||||||||||||||
| /// Mirrors `ASAuthorizationError.matchedExcludedCredential` (iOS 18+). | ||||||||||||||||||||||||||||||||||
| /// - credentialImport: An error occurred importing a credential. Mirrors | ||||||||||||||||||||||||||||||||||
| /// `ASAuthorizationError.credentialImport` (iOS 18.2+). | ||||||||||||||||||||||||||||||||||
| /// - credentialExport: An error occurred exporting a credential. Mirrors | ||||||||||||||||||||||||||||||||||
| /// `ASAuthorizationError.credentialExport` (iOS 18.2+). | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+18
to
+25
|
||||||||||||||||||||||||||||||||||
| /// non-interactive context. Mirrors `ASAuthorizationError.notInteractive` | |
| /// (iOS 15.4+). | |
| /// - matchedExcludedCredential: A matched credential was excluded from use. | |
| /// Mirrors `ASAuthorizationError.matchedExcludedCredential` (iOS 18+). | |
| /// - credentialImport: An error occurred importing a credential. Mirrors | |
| /// `ASAuthorizationError.credentialImport` (iOS 18.2+). | |
| /// - credentialExport: An error occurred exporting a credential. Mirrors | |
| /// `ASAuthorizationError.credentialExport` (iOS 18.2+). | |
| /// non-interactive context. Mirrors `ASAuthorizationError.Code.notInteractive` | |
| /// (iOS 15.4+). | |
| /// - matchedExcludedCredential: A matched credential was excluded from use. | |
| /// Mirrors `ASAuthorizationError.Code.matchedExcludedCredential` (iOS 18+). | |
| /// - credentialImport: An error occurred importing a credential. Mirrors | |
| /// `ASAuthorizationError.Code.credentialImport` (iOS 18.2+). | |
| /// - credentialExport: An error occurred exporting a credential. Mirrors | |
| /// `ASAuthorizationError.Code.credentialExport` (iOS 18.2+). |
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.
breakableBottomConstraintis created and its priority is set, but it’s never activated. If the intent is to keep the footer label bottom-aligned when possible (and let it break when the container is taller), the constraint should be activated; otherwise this constraint has no effect and the label may not pin to the container bottom even when it could.