Skip to main content
An Ad Unit defines an ad placement and format. Pass its Ad Unit Key from the dashboard to the ad API. This differs from the app’s Integration Key. Existing Ad Unit IDs (UUIDs) remain valid inputs.

Before You Begin

Check requirements before integration.

Requirements

  • iOS 13.0 or higher
  • Xcode 26 or higher
Verify app-ads.txt setup before proceeding.

Install the SDK

Install the DARO 2.0.8 SDK with Swift Package Manager (SPM) or CocoaPods. If your app uses the legacy SDK (before 2.0.0), follow the iOS migration guide first.
One SDK supports all ad formats. Use import Daro in Swift and DaroObjCBridge in Objective-C.
New versions will be available only through SPM starting December 1, 2026Starting December 1, 2026, Daro will stop publishing new iOS SDK versions to CocoaPods. Use Swift Package Manager (SPM) to install new versions released from that date onward.Versions already published to CocoaPods will remain available to install and use, and support for those versions will continue. Apps using an existing version do not need to migrate immediately.
In Xcode, open File > Add Package Dependencies…, enter this URL, and select version 2.0.8.
Add the DaroAds product for Swift or DaroObjCBridgeAds for Objective-C to your app target.For a Package.swift declaration:
SPM does not run the Integration Key configuration tool automatically. Download and extract the matching SDK ZIP. Use the included Scripts/daro tool.Add the following to the source Info.plist used by your app target. Create an actual file and point Build Settings > Info.plist File (INFOPLIST_FILE) to it.
From the extracted directory, run this command with the path to your app’s source Info.plist:
Build the app after the command succeeds. Run it for each file if Debug and Release use different files, and run it again whenever the Integration Key changes.
Do not add this command to an app build phase or run it against the built app’s Info.plist. Apply the configuration to the project source before building.
For both Swift and Objective-C, add -ObjC to the app target’s Build Settings > Other Linker Flags (OTHER_LDFLAGS). See Other Linker Flags.

Configure Your App

Complete Integration Key configuration using your installation method above. Add the following SKAdNetworkItems to the app’s Info.plist manually.
Copy SKAdNetworkItems from Info.plist to your app’s Info.plist. Required for ad demand sources to receive conversion performance reports. Significantly affects ad performance.

Other Linker Flags

When -ObjC is requiredYou must add -ObjC to your app target’s Build Settings > Other Linker Flags (OTHER_LDFLAGS) if any of the following applies:
  • Objective-C project
  • Swift project integrating DaroAds or DaroObjCBridgeAds via Swift Package Manager (required so ad demand adapters are detected at runtime)
Without this flag, the SDK may not work correctly or some ad demand sources will fail to load.
Follow these steps in Xcode project settings:
  1. Select your project file in Xcode
  2. Select the Build Settings tab
  3. Search for “Other Linker Flags”
  4. Add -ObjC to Other Linker Flags

Initialize SDK

Important: Load Ads After InitializationLoad all ads after SDK initialization completes. Requesting ads before initialization may prevent proper display.
Add to your app’s AppDelegate file:

Preventing currentWindow Crashes

currentWindow-Related Crashes in Some Ad SDKsSome ad SDKs may throw unrecognized selector sent to instance exceptions when accessing UIApplication.shared.delegate.window. This occurs when the AppDelegate doesn’t have a window property defined in SceneDelegate or SwiftUI environments.Add the following variable to your AppDelegate to prevent this issue:

Log Level

DARO SDK supports the following log levels:
  • .off / Off: No log output
  • .error / Error: Only error logs
  • .debug / Debug: All log output (recommended during development)

Set User ID

Set userId property if your app requires user identification. Value sends with all ad requests.

App Mute Setting

For app open, banner, interstitial, rewarded, and native ad formats, you can use the setAppMuted method to inform the DARO SDK that the app volume has been muted.
Native ads apply the mute state to video playback at load time. Call setAppMuted before loading native ads.
App Mute Usage PrecautionsWhen app mute is enabled, some video ad creatives that cannot play while muted may be excluded from ad requests, which can slightly reduce the ad pool and affect revenue.

Precautions

Location-Based Background UpdatesApps using location-based background updates that display ads on first screen must implement additional handling to load and display ads when app becomes active.See: Handling Location Updates in the Background