AppCallbackHandler

public final class AppCallbackHandler: NSObject

Use this class if your app crashes when switching to/from external payment apps, such as TWINT, Swish, Vipps, and MobilePay. Our automatic app callback logic may interfere with other logic in your app and needs to be disabled.

Globally set AppCallbackHandler.shared.automaticCallbacks to false. Then implement the application(_:open:options:) method in your AppDelegate and call AppCallbackHandler.shared.handleURL(url) with the URL received.

Public

  • Returns the shared instance of this class.

    Declaration

    Swift

    public static let shared = AppCallbackHandler()
  • Whether automatic callback handling is enabled or not. By default, automatic callback handling is enabled. Set this to false to disable automatic callbacks and implement them yourself using handleURL(url).

    Declaration

    Swift

    public var automaticCallbacks = true
  • Invoke this method from your AppDelegate’s implementation of application(_:open:options:) with the URL received. The method returns true if the URL was handled by the SDK or false otherwise.

    Declaration

    Swift

    public func handleURL(_ url: URL) -> Bool