Skip to content

Package fails to build in Xcode 26.4.1 (17E202) #310

@rockarts

Description

@rockarts
Protocol 'ASAuthorizationControllerPresentationContextProviding' requires 'presentationAnchor(for:)' to be available in iOS 12.0 and newer
AuthenticationSessionPresentationContextProvider.swift:30

With Xcode 26.4.1 protocol witness rules are enforced more strictly which causes this code to fail:

class AuthenticationSessionContextPresentationProvider: NSObject, ASWebAuthenticationPresentationContextProviding, ASAuthorizationControllerPresentationContextProviding {
    @available(iOS 12.0, *)
    func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
        return presentationContext
    }
    
    @available(iOS 13.0, *)
    func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
        return presentationContext
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions