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.0.3 (auto-fetched from CocoaPods trunk).

Podfile
pod 'BideaseSDK', '2.0.3'

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.

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 are set on InitParams and apply to every subsequent ad request. You can also update them at runtime once the SDK is initialized.

4.1. Privacy parameters

import BideaseMobileSDK

let privacyParams = PrivacyConfig(
coppaEnabled: true,
subjectToGdpr: true,
subjectToCoppa: false,
usPrivacyString: "1YNN",
gppString: "DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN",
gppSid: [2, 6],
userConsentString: "CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA",
subjectToLgpd: true
)
FieldTypeDescription
coppaEnabledBoolEnable 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. 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

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.