iOS SDK - Testing & debugging
Test ads
In test mode, ad network SDKs are initialized in their test mode or with test credentials. Use it during development to test your integration and to prevent ad networks from flagging your traffic as fraudulent. Enable it before initializing the MDN11 SDK.
Caution
Don't release your app with test ads enabled.
Logging
Add a logger to receive the SDK's log messages. To also turn on the ad network SDKs' own debug logging, call setDevelopmentMode(enabled: true). Do both before initializing the MDN11 SDK, so you don't miss early messages. The SDK ignores setDevelopmentMode(enabled:) if it's called after initialization.
final class MyLogger: A11Logger {
func log(priority: OSLogType, message: String) {
print(message)
}
}
A11.shared.setDevelopmentMode(enabled: true)
let logger = MyLogger()
A11.shared.addLogger(logger)
// Stop receiving log messages
A11.shared.removeLogger(logger)
Caution
Don't release your app with verbose logging enabled. It adds overhead and fills the device log. Only enable it in development builds.