ASWebAuthenticationSessionPresenter

@available(iOS 12.0, *)
public class ASWebAuthenticationSessionPresenter : ASWebAuthenticationSessionPresenting

Default implementation of ASWebAuthenticationSessionPresenting.

  • The presenter delegate.

    Declaration

    Swift

    public weak var delegate: WebViewPresenterDelegate?
  • The callback URL scheme to be used with the ASWebAuthenticationSession instance.

    Declaration

    Swift

    public var callbackURLScheme: String?
  • Safari view controller used by the load method that needs to load the url.

    Declaration

    Swift

    public var authenticationSession: ASWebAuthenticationSession?
  • The view controller used to present the navigation controller. By default it searches the topmost view controller automatically at the call of the property. It is also settable by the application if necessary. The presenting view controller needs to implement the ASWebAuthenticationPresentationContextProviding interface and return the relevant window in the presentationAnchor method.

    Declaration

    Swift

    public var webViewPresentingViewController: UIViewController? { get set }
  • Default implementation of SFSafariViewControllerPresenting.

    Declaration

    Swift

    public init(delegate: WebViewPresenterDelegate? = nil, callbackURLScheme: String?)

    Parameters

    delegate

    The delegate instance.

  • Presents the web view and passes the instance in the completion handler.

    Declaration

    Swift

    public func presentWebView(with url: URL, sessionCompletionHandler: @escaping ASWebAuthenticationSession.CompletionHandler, completionHandler: @escaping (ASWebAuthenticationSession?, Error?) -> Void)

    Parameters

    with

    The initial url which will be loaded in the web view. Can not change later.

  • Dismisses the presented web view.

    Declaration

    Swift

    public func dismissWebView()
  • Declaration

    Swift

    public func reloadWebView()