CLASS
HaapiDeepLinkManager
Contents
- Properties
shared
- Methods
registerHaapiFlowDeeplinkable(_:)unregisterHaapiFlowDeeplinkable(_:)canHandleUrl(_:)handleUrl(_:)
public class HaapiDeepLinkManager: HaapiDeepLinkManageable, HaapiFlowDeepLinkable
An Haapi deep link manager that is a singleton and conforms to HaapiDeepLinkManageable and HaapiFlowDeepLinkable. HaapiDeepLinkManager manages only one registered HaapiFlowDeepLinkable.
When supporting deep linking with Haapi, HaapiDeepLinkManager can be used when HaapiFlow.start() is invoked . When HaapiDeepLinkManager has been passed to HaapiFlow.start(), HaapiDeepLinkManager.canHandleUrl() and HaapiDeepLinkManager.handleUrl() have to be invoked.
- Note:
- If using an AppDelegate and a SceneDelegate,
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)has to be implemented. - If using an AppDelegate and not a SceneDelegate,
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Boolhas to be implemented. - If using SwiftUI,
.onOpenURL(perform: ...)has to be implemented in@mainof the content view.
- If using an AppDelegate and a SceneDelegate,
Properties
shared
public static let shared = HaapiDeepLinkManager()
Methods
registerHaapiFlowDeeplinkable(_:)
public func registerHaapiFlowDeeplinkable(_ haapiFlowDeepLinkable: HaapiFlowDeepLinkable)
Parameters
| Name | Description |
|---|---|
| haapiFlowDeepLinkable | An haapiFlowDeepLinkable. |
unregisterHaapiFlowDeeplinkable(_:)
public func unregisterHaapiFlowDeeplinkable(_ haapiFlowDeepLinkable: HaapiFlowDeepLinkable) -> Bool
Parameters
| Name | Description |
|---|---|
| haapiFlowDeepLinkable | An haapiFlowDeepLinkable. |
canHandleUrl(_:)
public func canHandleUrl(_ url: URL) -> Bool
handleUrl(_:)
public func handleUrl(_ url: URL)