Step 3. Initialize the SDK
-
In your
ViewController.swift
file, import theFRAuth
module:// // ViewController.swift // DemoApp // import UIKit import FRAuth class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } }
You can now start using the SDK.
-
Initialize the SDK with the
FRAuth.start()
method.This enables you to verify that the SDK is working correctly. To catch any errors, add a print statement to confirm that the SDK is initialized.
In
ViewController.swift
, add the following call to theviewDidLoad()
method:do { try FRAuth.start() print("SDK initialized successfully") } catch { print(error) }
Your complete
viewController.swift
file should now resemble the following:// // ViewController.swift // DemoApp // // import UIKit import FRAuth class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. do { try FRAuth.start() print("SDK initialized successfully") } catch { print(error) } } }
-
Save your changes.
You should now be able to use the SDK in your project.