EXTENSION
HaapiFlow
public extension HaapiFlow
Methods
start(_:haapiUIKitApplication:haapiDeepLinkManageable:nibName:bundle:notificationCenter:)
static func start(_ haapiFlowResult: HaapiFlowResult,
haapiUIKitApplication: HaapiUIKitApplication,
haapiDeepLinkManageable: HaapiDeepLinkManageable?,
nibName nibNameOrNil: String? = "HaapiFlowViewController",
bundle nibBundleOrNil: Bundle? = Bundle(for: HaapiFlowViewController.self),
notificationCenter: NotificationCenter = NotificationCenter.default)
-> 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.
- notificationCenter: the instance of
NotificationCenter
that will mediate SwiftUI <> UIKit notification flow
- Returns:
Some View
for SwiftUI. - Note: Only for SwiftUI.
- Experiment: Due to SwiftUI limitations, it is not possible to catch any exceptions when invoking
HaapiFlow.start
opposite to the UIKit version. When presenting by invoking.sheet
, the presentationMode in the HaapiUIKitConfiguration must be set tomodal
. When usingNavigationView
/NavigationStack
, the presentationMode in the HaapiUIKitConfiguration must be set tostack
. When usingNavigationView
/NavigationLink
or.sheet()
, some different behaviours may happen on simulator and physical device. It is recomended to thoroughly test your app navigation. If necessary, additional level of control over theAuthentication flow
presentation can be achieved by instantiating and using theHaapiFlowVCRepresentable
or create a customUIViewControllerRepresentable
that wraps theHaapiFlowViewController
.
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. |
notificationCenter | the instance of NotificationCenter that will mediate SwiftUI <> UIKit notification flow |