1. Native Sandbox vs. Browser Web: The Foundational Differences
In web advertising, programmatic delivery is driven by client-side JavaScript running inside a shared browser execution context. Cookies, localStorage, DOM manipulation, and asynchronous HTTP fetch calls power the entire pipeline.
Mobile apps operate in an entirely different paradigm. On iOS (Cocoa/Swift) and Android (Kotlin/Java), applications execute in isolated process sandboxes. There is no shared cookie jar across apps, no global DOM, and direct network access is constrained by OS background execution policies, App Tracking Transparency (ATT), and Google Play permission frameworks.
[Native Mobile App (Host Application)]
│
▼ 1. Host app requests ad placement (e.g. interstitial at game level complete)
[In-App Mediation SDK (AppLovin MAX / IronSource / AdMob)]
│
├───────────────────────────────┬───────────────────────────────┐
▼ ▼ ▼
[Demand Network SDK A] [Demand Network SDK B] [OpenRTB In-App Bidder]
│ (Custom binary adapter) │ (Custom binary adapter) │ (Server-side auction)
└───────────────────────────────┼───────────────────────────────┘
▼
[Highest Bidder Cleared]
│
▼ 2. Pre-cache video or render MRAID in webview
[Ad Rendered on Screen]
│
▼ 3. User Clicks CTA Button
[Universal Link / App Store Redirect]
│
▼ 4. App Download & First Launch
[MMP SDK Attribution Postback]
2. The SDK & Mediation Layer: The On-Device Ad Server
An app publisher does not write raw HTTP calls to hundreds of DSPs. Instead, they integrate an In-App Mediation SDK. The mediation SDK acts as the publisher's decentralized ad server running directly on the user's mobile device:
- Network Adapters: Modular libraries allowing external ad networks (Google, Meta Audience Network, Unity Ads, Mintegral) to bid and render through unified interfaces.
- In-App Bidding (Advanced Bidding): Replaces legacy sequential waterfalls by running real-time auctions across all demand sources simultaneously, extracting maximum yield for each impression.
- Creative Pre-Caching: For heavy formats like Rewarded Video and Interstitials (10MB–30MB assets), the SDK downloads media files in the background while the user plays level 1, ensuring instantaneous playback without buffering when level 1 ends.
3. Anatomy of an In-App OpenRTB Bid Request
When the mediation layer dispatches programmatic ad requests to SSPs and DSPs, it transmits an OpenRTB payload containing the app object instead of the site object:
{
"id": "app-auction-99214018",
"imp": [
{
"id": "1",
"banner": {
"w": 320,
"h": 480,
"pos": 7,
"api": [3, 5]
},
"bidfloor": 4.20,
"bidfloorcur": "USD",
"instl": 1
}
],
"app": {
"id": "app-store-id-1849201",
"name": "Tower Defense Legend 3D",
"bundle": "com.gamestudio.towerdefense",
"storeurl": "https://apps.apple.com/app/id1849201",
"cat": ["IAB9-30"],
"ver": "2.4.1",
"publisher": {
"id": "pub-5510",
"name": "GameStudio Interactive"
}
},
"device": {
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15",
"ip": "72.14.201.33",
"geo": { "country": "USA", "region": "NY", "city": "New York" },
"make": "Apple",
"model": "iPhone 15 Pro",
"os": "iOS",
"osv": "17.4",
"devicetype": 4,
"connectiontype": 6,
"ifa": "23600C05-3E2B-4808-800E-DE4C19E7FBE0"
},
"regs": {
"coppa": 0,
"ext": { "gdpr": 0 }
},
"tmax": 150
}
Critical In-App Parameters
app.bundle: The operating system package identifier (e.g.,com.gamestudio.towerdefense). Buyers use this to verify inventory inapp-ads.txtand prevent app spoofing.imp[].instl = 1: Indicates that the placement is a full-screen interstitial or transition ad, commanding substantially higher eCPMs than standard banners.imp[].banner.api = [3, 5]: Declares supported client runtime APIs (3 = MRAID-1, 5 = MRAID-2, 6 = MRAID-3). DSPs verify this before serving interactive rich media creatives.device.devicetype = 4: Formally signals a Phone/Mobile device (devicetype 5 represents Tablet).device.ifa: IDFA on iOS or GAID on Android. If ATT consent is denied, this field is omitted or filled with zeroes (00000000-0000-0000-0000-000000000000).
4. MRAID & Video Rendering: Inside the App Webview
Display ads in native apps are rendered inside a sandboxed webview component (WKWebView on iOS, Android WebView). Because a webview is isolated from the native operating system, rich media ads cannot natively close, vibrate the device, or detect screen orientation changes.
The IAB MRAID (Mobile Rich Media Ad Interface Definitions) standard bridges this gap by injecting a JavaScript bridge (mraid.js) into the webview. When an interactive playable ad finishes, it invokes:
// MRAID API call to open the App Store page directly:
mraid.open("https://apps.apple.com/app/id1849201");
5. Measurement & the MMP Attribution Loop
In mobile app campaigns, payment models typically hinge on performance: Cost Per Install (CPI) or Cost Per Action (CPA). The measurement loop connects the ad impression to the downstream app install:
- Ad Click: User taps the CTA button. The ad SDK fires a click tracking beacon and redirects through an MMP measurement tracking link (e.g.
app.appsflyer.com/com.gamestudio...?clickid=xyz). - Store Redirect: The user is routed to Google Play or Apple App Store.
- Install & First Launch: The user downloads and opens the app. On initial launch, the embedded MMP SDK (AppsFlyer, Adjust, Kochava, Branch) initializes.
- Attribution Resolution: The MMP matches the device identifier (GAID/IDFA) or uses Apple's privacy-preserving SKAdNetwork (SKAN) framework to attribute the install to the winning ad network and campaign ID.
- Postback: The MMP dispatches an HTTP server-to-server postback to the DSP, reporting the successful install and conversion timestamp.
6. Solution Engineer RCA Playbook
Incident: "Ad request is firing from client, but campaign is delivering zero impressions."
Investigation Methodology:
- Charles Proxy Traffic Audit: Connected test device to proxy. Validated that outgoing HTTP request from app contains
app.bundle: "com.studio.game". - app-ads.txt Verification: Scraped publisher domain's
app-ads.txtfile. Discovered the publisher recently changed their bundle identifier on the App Store fromcom.studio.game_freetocom.studio.game, but forgot to update the corresponding listing on their developer website. DSPs rejected all bids as unauthorized inventory. - SDK Version Check: Verified mediation adapter version. Found the demand adapter was using an outdated SDK build incompatible with iOS 17 privacy manifest requirements.
7. Real-World Interview Scenarios
Scenario: "How does Apple's App Tracking Transparency (ATT) impact OpenRTB bid requests?"
Answer: When an iOS user selects "Ask App not to Track", the OS zeroes out the IDFA. In the OpenRTB bid request, device.ifa is either omitted or sent as 36 zeroes. The DSP cannot perform device-level frequency capping, cross-app retargeting, or user behavioral bidding. Valuation must rely on contextual app signals (category, bundle, geo, time-of-day), and attribution shifts to Apple's aggregated SKAdNetwork (SKAN) postbacks.
Validate In-App OpenRTB Payloads
Inspect mobile app objects, verify app.bundle, audit MRAID API support arrays, and test identity signals in the live validator.