Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IFTTT SDK/ConnectButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public class ConnectButton: UIView {
footerLabel.constrain.edges(to: footerLabelContainer, edges: [.left, .top, .right])

// But allow it to be shorter than its container
footerLabel.bottomAnchor.constraint(lessThanOrEqualTo: footerLabelContainer.bottomAnchor)
footerLabel.bottomAnchor.constraint(lessThanOrEqualTo: footerLabelContainer.bottomAnchor).isActive = true
let breakableBottomConstraint = footerLabel.bottomAnchor.constraint(equalTo: footerLabelContainer.bottomAnchor)
breakableBottomConstraint.priority = .defaultHigh

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breakableBottomConstraint is 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.

Suggested change
breakableBottomConstraint.priority = .defaultHigh
breakableBottomConstraint.priority = .defaultHigh
breakableBottomConstraint.isActive = true

Copilot uses AI. Check for mistakes.

Expand Down
21 changes: 21 additions & 0 deletions IFTTT SDK/SignInWithAppleAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AuthenticationError includes .presentationContextInvalid, but didCompleteWithError never maps ASAuthorizationError.Code.presentationContextInvalid to it (it currently falls through to .unknown). Add an explicit mapping so callers can distinguish this error from .unknown/.failed, consistent with the 1:1 mapping intent described in the comment.

Copilot uses AI. Check for mistakes.
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))
Expand Down
13 changes: 13 additions & 0 deletions IFTTT SDK/WebServiceAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comments reference ASAuthorizationError.notInteractive / .matchedExcludedCredential / .credentialImport / .credentialExport, but these cases live on ASAuthorizationError.Code (e.g., ASAuthorizationError.Code.notInteractive). Updating the symbol names in the documentation will avoid misleading API docs for maintainers/callers.

Suggested change
/// 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+).

Copilot uses AI. Check for mistakes.
/// - unknown: Some unknown error ocurred when authenticating with the web service.
enum AuthenticationError: Error {
case userCanceled
case failed
case invalidResponse
case notHandled
case presentationContextInvalid
case notInteractive
case matchedExcludedCredential
case credentialImport
case credentialExport
case unknown
}

Expand Down
Loading