Skip to main content

Native SDK

Integrate with AI ·Copy a step-by-step prompt for Claude Code, Cursor, Copilot, or ChatGPT.

Before You Begin

To integrate the Bidease SDK, you need an active publisher account on the Bidease Monetize platform. If you don't have one yet, contact your account manager.

Prerequisites:

  • Minimum deployment target: iOS 13.0
  • Minimal Xcode version: 16.4

1. Installation

CocoaPods

Current published version: 2.2.2 (auto-fetched from CocoaPods trunk).

Podfile
pod 'BideaseSDK', '2.2.2'
warning

Always use the latest available SDK version from Bidease.

Update your Info.plist:

<key>NSUserTrackingUsageDescription</key>
<string>Your data will be used to deliver personalized ads to you.</string>

2. Initialization

2.1. Getting your App Key

Your App Key is available in the Bidease Monetize dashboard:

  1. Log in to your account at monetize.bidease.com
  2. Go to Applications
  3. Open the required application
  4. Copy the App Key

App Key location in the Monetize dashboard

2.2. SDK Initialization

Initialize the SDK as early as possible in your app lifecycle:

import BideaseMobileSDK

BideaseMobile.initialize(
params: InitParams(
key: "YOUR_APP_KEY",
privacyParams: PrivacyConfig(/* see Privacy & Consent */),
customProps: ["ipv4": "203.0.113.17"]
)
) { error in
if let error = error {
print("Init failed: \(error)")
} else {
print("SDK initialized")
}
}
note

privacyParams and customProps are optional. See Privacy & Consent for the full list of privacy fields.

warning
Replace YOUR_APP_KEY with the App Key from your Bidease Monetize dashboard.

3. Ad Formats

Before loading ads, create the corresponding placements in the Bidease Monetize dashboard. The placementName in your code must match the placement name configured in the UI.

The SDK supports two integration flows — Mediation, where a single load(...) call runs the auction and renders the ad, and the Bidding API, where you request a bid first, compare its price against other demand, and render only if Bidease wins.

Pick your integration flow

3.1. Banner

Supported sizes:

ConstantSizeDescription
AdSize320x50320×50Standard banner
AdSize300x250300×250Medium rectangle (mrec)
import BideaseMobileSDK

let banner = BannerView()
view.addSubview(banner)

banner.onLoaded = { print("Banner loaded") }
banner.onDisplayed = { print("Banner displayed") }
banner.onClicked = { print("Banner clicked") }
banner.onClosed = { print("Banner closed") }
banner.onFailed = { error in print("Banner failed: \(error)") }

let result = await banner.load(size: AdSize320x50, config: LoadConfig(placementName: "banner_main"))
switch result {
case .success(let data):
print("Banner loaded: \(data)")
case .failure(let error):
print("Banner failed: \(error)")
@unknown default:
break
}

3.2. Interstitial

import BideaseMobileSDK

let interstitial = InterstitialAd()

interstitial.onLoaded = { print("Loaded") }
interstitial.onDisplayed = { print("Displayed") }
interstitial.onClicked = { print("Clicked") }
interstitial.onClosed = { print("Closed") }
interstitial.onFailed = { error in print("Failed: \(error)") }

let result = await interstitial.load(config: LoadConfig(placementName: "interstitial_main"))
switch result {
case .success(let data):
print("Loaded: \(data)")
case .failure(let error):
print("Failed: \(error)")
@unknown default:
break
}

interstitial.show()

3.3. Rewarded

Rewarded ads extend interstitial with an onRewarded callback that fires when the user completes the ad.

import BideaseMobileSDK

let rewarded = RewardedAd()

rewarded.onRewarded = { print("User earned reward!") }
rewarded.onLoaded = { print("Loaded") }
rewarded.onDisplayed = { print("Displayed") }
rewarded.onClicked = { print("Clicked") }
rewarded.onClosed = { print("Closed") }
rewarded.onFailed = { error in print("Failed: \(error)") }

let result = await rewarded.load(config: LoadConfig(placementName: "rewarded_main"))
switch result {
case .success(let data):
print("Loaded: \(data)")
case .failure(let error):
print("Failed: \(error)")
@unknown default:
break
}

rewarded.show()

Privacy signals and custom props are passed to the Bidease SDK via InitParams at initialization. Set them when you initialize the SDK, or update them at runtime via BideaseMobile.setPrivacyParams(...) / setCustomProps(...).

COPPA

Not for child-directed traffic. Bidease does not purchase or monetize traffic from applications directed to children or to individuals under the age of 13. Publishers are solely responsible for identifying child-directed inventory under COPPA and other applicable laws and must not integrate the Bidease SDK into, or send any traffic or personal data from, such inventory.

import BideaseMobileSDK

let privacyParams = PrivacyConfig(
coppaEnabled: false,
subjectToGdpr: true,
subjectToCoppa: false,
usPrivacyString: "1YNN",
gppString: "DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN",
gppSid: [2, 6],
userConsentString: "CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA",
subjectToLgpd: true
)
FieldTypeDescription
coppaEnabledBool?Enable COPPA compliance
subjectToGdprBool?Subject to GDPR
subjectToCoppaBool?Subject to COPPA
usPrivacyStringString?IAB US Privacy string (e.g. "1YNN")
gppStringString?IAB GPP consent string
gppSid[Int]?GPP section IDs
userConsentStringString?IAB TCF consent string
subjectToLgpdBool?Subject to Brazilian LGPD

4.2. Updating at runtime

import BideaseMobileSDK

BideaseMobile.setPrivacyParams(privacyParams)
BideaseMobile.setCustomProps(["ipv4": "203.0.113.17"])
note

Runtime setters are no-ops before BideaseMobile.initialize(...) completes. Pass an initial value via InitParams and use the setters only for later updates.

5. SKAdNetwork IDs

The Bidease SDK supports SKAdNetwork so partner networks can attribute installs when IDFA is unavailable. Add the SKAdNetworkItems entry to your Info.plist:

  1. In Xcode, select Info.plist in the Project navigator.
  2. Right-click Info.plist → Open As → Source Code.
  3. Copy the SKAdNetworkItems array from the file below and paste it into your Info.plist.
Download SKAdNetworkItems.plistApple SKAdNetwork IDs

6. Test Mode

Option 1: Enable via Code

Pass testMode: true in LoadConfig:

let result = await interstitial.load(config: LoadConfig(placementName: "test", testMode: true))

let result = await interstitial.load(config: .init(testMode: true))

Option 2: Enable via Dashboard

  1. Go to Applications and open the required app
  2. Navigate to Test Devices and add the devices you want to test on — use IDFA (iOS)
  3. Enable Test for the application

7. QA Checklist

Read before shipping
  • Test Mode provides nearly 100% fill — expected behavior for QA only.
  • Disable Test Mode before submitting your app to the App Store.
  • Ensure IDFA tracking is enabled on your test device so the Bidease team can review logs.
  • If you run into any issues, contact your Bidease account manager.