Troubleshooting

In this article, you will learn how to receive errors reported by Nimbus, enable or disable test mode, and troubleshoot any other issues that may appear while integrating Nimbus.

Logging and Debugging

Nimbus iOS SDK includes logging and a test mode for debugging.

Logging

Logging is disabled by default so as not to affect production apps. It’s very easy to enable logging.

Nimbus.shared.logLevel = .debug

Custom logging

A custom logger can be used instead of the NimbusLogger. This allows for more flexibility.

import NimbusKit

final class CustomLogger: Logger {
    var selectedLogLevel: NimbusLogLevel = .off

    func log(_ message: String, level: NimbusLogLevel) {
        // Your code here
    }
}

Nimbus.shared.logger = CustomLogger()
Nimbus.shared.logLevel = .debug

Test mode

Nimbus iOS SDK has a test mode which is used to run test auctions. This will ensure that Nimbus always returns a test ad. This can be used to make sure that the integration is working.

Nimbus.shared.testMode = true

NimbusAdManager.showAd(...) will show a test ad going forward.

After completing the steps above, you will be able to properly debug Nimbus Ads in your app.

Last updated