Skip to main content
An Ad Unit defines an ad placement and format in your app. For the DARO 2.0.1 SDK, copy the Ad Unit Key from the updated dashboard. This is different from the app’s Integration Key. API parameters such as adUnitId, unitId, and key, and example placeholders such as YOUR_AD_UNIT_ID, keep their names but take that Ad Unit’s Ad Unit Key. Existing integrations using Ad Unit IDs remain supported. Do not confuse reporting or callback identifiers with the key for a new integration.

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.1 SDK with CocoaPods or Swift Package Manager (SPM). 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.
Add the dependency to your app target in the Podfile.
For Objective-C, install DaroObjCBridge at the same version instead of DaroAds.Add this hook to the same Podfile. If a post_install block already exists, add the four lines inside that block instead of creating another one.
Add the Integration Key issued by the dashboard to the source Info.plist used by your app target.
Create an actual Info.plist file and point the app target’s Build Settings > Info.plist File (INFOPLIST_FILE) to it. The hook does not support targets that only use an automatically generated Info.plist. If Debug and Release use different files, add the key to each file.
Install the SDK and apply the required app settings:
Run pod install again whenever the Integration Key changes. Resolve any hook errors before building your app.

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