EXTENSION
HaapiFlow
public extension HaapiFlow
Methods
start(_:haapiUIKitApplication:haapiDeepLinkManageable:nibName:bundle:)
static func start(_ haapiFlowResult: HaapiFlowResult,
haapiUIKitApplication: HaapiUIKitApplication,
haapiDeepLinkManageable: HaapiDeepLinkManageable?,
nibName nibNameOrNil: String? = "HaapiFlowViewController",
bundle nibBundleOrNil: Bundle? = Bundle(for: HaapiFlowViewController.self))
-> some View
Starts the Haapi flow by returning some View
.
- Parameters:
- haapiFlowResult: An HaapiFlowResult that receives a result from the Haapi flow.
- haapiUIKitApplication: An HaapiUIKitApplication.
- haapiDeepLinkManageable: An HaapiDeepLinkManageable for deep link.
- nibName:A nib name.
- bundle: A specified bundle.
- Returns:
Some View
for SwiftUI. - Note: Only for SwiftUI.
- Experiment: Due to SwiftUI limitation, it is not possible to catch any exceptions when invoking
HaapiFlow.start
opposite to the UIKit version. When usingNavigationView
/NavigationLink
or.sheet()
, some different behaviours may happen on simulator and physical device. When invoking.sheet
, the presentationMode in the HaapiUIKitConfiguration must be set tomodal
. When usingNavigationView
/NavigationLink
, the presentationMode in the HaapiUIKitConfiguration must be set tostack
. If necessary, additional level of control over theAuthentication flow
presentation can be achieved by instantiating and using theHaapiFlowVCRepresentable
.
Parameters
Name | Description |
---|---|
haapiFlowResult | An HaapiFlowResult that receives a result from the Haapi flow. |
haapiUIKitApplication | An HaapiUIKitApplication. |
haapiDeepLinkManageable | An HaapiDeepLinkManageable for deep link. |
nibName | A nib name. |
bundle | A specified bundle. |