RedirectComponent

public final class RedirectComponent : NSObject, PresentableComponent, ActionComponent
extension RedirectComponent: SFSafariViewControllerDelegate

A component that handles a redirect action.

  • Initializes the component.

    Declaration

    Swift

    public init(url: URL, paymentData: String, style: RedirectComponentStyle? = nil)

    Parameters

    url

    The URL to where the user should be redirected.

    paymentData

    The payment data returned by the server.

    style

    The component’s UI style.

  • Initializes the component.

    Declaration

    Swift

    public convenience init(action: RedirectAction, style: RedirectComponentStyle? = nil)

    Parameters

    action

    The redirect action to perform.

    style

    The component’s UI style.

Returning From a Redirect

  • This function should be invoked from the application’s delegate when the application is opened through a URL.

    Declaration

    Swift

    @discardableResult
    public static func applicationDidOpen(from url: URL) -> Bool

    Parameters

    url

    The URL through which the application was opened.

    Return Value

    A boolean value indicating whether the URL was handled by the redirect component.