Troubleshooting
This section contains information on how to diagnose issues within the application, or with communication to the ForgeRock Identity Platform.
Enable debug logging
The basic Swift error handling is generic and may not provide enough information for you to troubleshoot the SDK.
The FRAuth
package provides extensive logging for debugging purposes.
To enable logging, add FRLog.setLogLevel
to your ViewController
class.
For example:
//
// ViewController.swift
// DemoApp
//
import UIKit
import FRAuth
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
FRLog.setLogLevel(.all)
do {
try FRAuth.start()
print("SDK initialized successfully")
}
catch {
print(error)
}
}
}
When you have enabled debug logging, the output provides extensive information to help you troubleshoot the SDK.
To disable logging, set:
FRLog.setLogLevel(.none)
The following log levels are supported:
Level | Usage |
---|---|
|
No debug log at all |
|
Highly detailed log |
|
Useful information log |
|
Network requests / response logs |
|
Non-critical error that does not impact flow or functionality of the SDK |
|
Critical error that does impact flow or functionality of the SDK |
|
All log levels |