How To
ForgeRock Identity Platform
ForgeRock Identity Cloud

How do I troubleshoot the ForgeRock SDK for iOS?

Last updated Feb 15, 2022

This article contains information on how to diagnose issues within the iOS® 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 succesfully")         }         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
none No debug log at all
verbose Highly detailed log
info Useful information log
network Network requests / response logs
warning Non-critical error that does not impact flow or functionality of the SDK
error Critical error that does impact flow or functionality of the SDK
all All log levels

Copyright and Trademarks Copyright © 2022 ForgeRock, all rights reserved.