Skip to content

Troubleshooting

The SDK writes its logs to the unified logging system, with the subsystem com.wortise.ads and the category sdk. Every message starts with <Wortise>, so they can be filtered both in the Xcode console and in the Console app.

By default, the SDK logs the main events of each ad (loaded, failed to load, shown, clicked…) and the errors. To obtain more detail, raise the log level before initializing the SDK:

WortiseLog.level = .debug

Some messages that are useful to verify an integration:

MessageMeaning
Device identifier: ...Logged at initialization. It is the device identifier sent with the ad requests, the one to add as a test device in the dashboard
Interstitial ad loaded for ad unit ...The ad is ready to be shown (there is an equivalent message for each format)
Interstitial ad failed to load for ad unit ...: NO_FILLThe load failed, with the name of the error
showAd(from:) called with no ad availableshowAd(from:) was called without a loaded ad
Ad load for ... is in cooldown, skipping requestloadAd() was ignored because of a recent failed load (debug level)

The didFailToLoad and didFailToShow delegate methods receive a WAAdError. Its name property returns the name shown in the logs, and message a short description.

ErrorNameMeaningWhat to do
.sdkNotInitializedSDK_NOT_INITIALIZEDAn ad was requested before the SDK was initializedCall WortiseAds.shared.initialize at app launch, before loading any ad
.invalidParamsINVALID_PARAMSA value of the request is missing or not validCheck that the ad unit ID is set, is correct and belongs to the format that is being loaded
.noFillNO_FILLThere is no ad available for the requestIt is expected from time to time. See No fill when it always happens
.serverErrorSERVER_ERRORThe ad server could not be reached, or it returned an errorCheck the connectivity of the device and try again later
.timeoutTIMEOUTThe load took too longTry again later
.loadFailedLOAD_FAILEDThe ad could not be loadedTry again later
.renderErrorRENDER_ERRORThe ad could not be rendered or presentedShow the ad from a view controller that is on screen, and load a new ad
.unspecifiedUNSPECIFIEDAny other errorReview the SDK logs for more detail

After a failed load, wait before trying again, as explained in Best practices.

The GADApplicationIdentifier key is missing in the Info.plist file, or its value is not valid. Add it with the Google App ID of your app, as explained in Setup Info.plist. The app also crashes when the ATT authorization is requested and NSUserTrackingUsageDescription is missing.

An ad is being loaded before WortiseAds.shared.initialize has been called. It usually happens only on the first launch after installing the app, because the app key is stored once the SDK has been initialized: delete the app and install it again to reproduce it. Initialize the SDK at app launch, before any ad is created.

  1. Load the corresponding test ad unit. If it does not fill either, the problem is in the integration: review the SDK logs and the rest of this page.
  2. If the test ad unit works, check that the ad unit ID is the one shown in the dashboard and that it belongs to the format that is being loaded.
  3. In banners, check that rootViewController has been assigned before calling loadAd(). Without it, part of the demand can not be loaded.
  4. A NO_FILL from time to time is normal: the availability of ads depends on the country, the device and the user.
  • Banner, interstitial, rewarded and app open ads hold their delegate weakly. If the delegate is an object that nothing else references, it is released immediately.
  • Check that the delegate property has been assigned, and that the signature of each method is exactly the one shown in the guide of the format. The methods are optional, so a method with a different signature compiles but is never invoked.
  • loadAd() does not invoke the delegate when it is ignored: while another load is in progress, or during the cooldown that follows a failed load.
  • No ad is available. Check isAvailable before showing: the method returns without invoking the delegate when there is nothing to show.
  • The ad has already been shown. Each ad can only be shown once, so load a new one after didDismiss.
  • The view controller that was passed is not on screen, or is already presenting another view controller.

After a failed load there is a cooldown (30 seconds by default) during which new loads are ignored. Use isInCooldown and cooldownRemaining to know when the ad can be loaded again.

When using WAAppOpenManager, loadAd() must be called once after getting the instance. The manager only shows an ad when the app becomes active and an ad is already loaded.

request(ifRequired:) only shows the dialog when the consent is required and has not been collected yet. In any other case, its delegate receives false and the app can continue.

If the problem persists, contact us and include the SDK logs with the debug level enabled.