SDK

iOS SDK Troubleshooting

Last updated Apr 7, 2020

This article 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 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 TrademarksCopyright © 2020 ForgeRock, all rights reserved.
Loading...