Native SDK
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, please reach out to your Bidease account manager or contact us at [email protected].
PrerequisitesMinimum deployment target: iOS
13.0Minimal Xcode version:
16.4
1. Installation
CocoaPods
pod 'BideaseSDK', '2.0.3'Update your Info.plist file with the next properties:
Info.plist file with the next properties:<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:
- Log in to your account at monetize.bidease.com
- Go to Applications
- Open the required application
- Copy the App Key
2.2. SDK Initialization
Use the App Key from the step above to initialize the SDK. Call initialize() as early as possible in your app lifecycle — ideally in your AppDelegate or @main App struct. Ad requests made before initialization is complete will not be served.
import BideaseMobileSDK
BideaseMobile.initialize("YOUR_APP_KEY") { error in
if let error = error {
print("Init failed: \(error)")
} else {
print("SDK initialized")
}
}Don't forget to replace
YOUR_APP_KEYwith the App Key from your Bidease Monetize dashboard.
3. Ad Formats
Before loading ads, make sure you have created the corresponding placements in the Bidease Monetize dashboard. The
placementNamein your code must match the placement name configured in the UI. Set up your placements →
3.1. Banner
Supported sizes:
| Constant | Size | Description |
|---|---|---|
AdSize320x50 | 320×50 | Standard banner |
AdSize300x250 | 300×250 | Medium 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)") }
// Async/await load banner — returns Result
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)") }
// Async/await load — returns Result
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
}
//Show
interstitial.show()3.3. Rewarded
Rewarded ads extend interstitial with an additional 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
}
//Show
rewarded.show()4. Privacy & Consent
You can pass privacy and consent parameters explicitly via PrivacyConfig. This allows you to forward user consent signals directly to the SDK at load time.
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
)
let result = await banner.load(
size: AdSize320x50,
config: LoadConfig(
placementName: "banner_main",
privacyParams: privacyParams
)
)| Field | Type | Description |
|---|---|---|
coppaEnabled | Bool | Enable COPPA compliance |
subjectToGdpr | Bool? | Subject to GDPR |
subjectToCoppa | Bool? | Subject to COPPA |
usPrivacyString | String? | IAB US Privacy string (e.g. "1YNN") |
gppString | String? | IAB GPP consent string |
gppSid | [Int]? | GPP section IDs |
userConsentString | String? | IAB TCF consent string |
subjectToLgpd | Bool? | Subject to Brazilian LGPD |
PrivacyConfigcan be passed to any ad format'sload()call — banner, interstitial, or rewarded.
5. Test Mode
Once you've implemented the SDK, you can test ads before release using one of the two methods below.
Option 1: Enable via Code
Pass testMode: true in LoadConfig:
// With placement name
let result = await interstitial.load(config: LoadConfig(placementName: "test", testMode: true))
// Without placement name (shorthand init)
let result = await interstitial.load(config: .init(testMode: true))Option 2: Enable via Dashboard
You can also activate test mode directly in the Bidease Monetize dashboard without any code changes:
- Go to Applications and open the required app
- Navigate to Test Devices and add the devices you want to test on — use IDFA (iOS)
- Enable Test for the application
QA Checklist
Important — please read before testing:
- Test Mode provides nearly 100% fill — this is 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 and assist with troubleshooting if needed.
- If you run into any issues, contact your Bidease account manager.
Updated 8 days ago