2019-08-20a minute read (About 117 words)How to use AppFlowController in iOSIssue #364 AppFlowController.swift 1234567891011121314151617181920212223242526272829303132333435363738394041import UIKitimport GoogleMapsimport Stripefinal class AppFlowController: UIViewController { private lazy var window = UIWindow(frame: UIScreen.main.bounds) func configure() { GMSServices.provideAPIKey(Constant.googleMapsApiKey) STPPaymentConfiguration.shared().publishableKey = Constant.stripeKey } func start() { if Deps.onboardingHandler.hasOnboarded { startMain() } else { startOnboarding() } window.makeKeyAndVisible() } func startOnboarding() { let controller = OnboardingController() controller.delegate = self window.rootViewController = controller } func startMain() { let controller = MainFlowController() window.rootViewController = controller controller.start() }}extension AppFlowController: OnboardingControllerDelegate { func onboardingControllerDidFinish(_ controller: OnboardingController) { Deps.onboardingHandler.hasOnboarded = true startMain() }} AppDelegate.swift 123456789101112131415@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate { private let appFlowController = AppFlowController() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { appFlowController.configure() appFlowController.start() UIApplication.shared.registerForRemoteNotifications() FirebaseApp.configure() return true }}#swiftiOS