Skip to content

Load demo banners on the main thread - #90

Merged
jrosendahl-opt merged 2 commits into
masterfrom
demo/main-thread-banner-loads
Nov 3, 2026
Merged

jrosendahl-opt merged 2 commits into
masterfrom
demo/main-thread-banner-loads

Conversation

@jrosendahl-opt

@jrosendahl-opt jrosendahl-opt commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

In the Swift demo, GAMBannerViewController and PrebidBannerViewController call loadBanner(...) straight from the targeting completion handler, which the SDK calls on a background thread. That loads the GAM banner, sets Prebid's global ORTB config and creates the BannerAdUnit off the main thread, which UIKit and the Google Mobile Ads SDK don't allow. It also contradicts the usage guide, which tells integrators to hop to main.

The Swift GAM and Prebid demos loaded their banners from the targeting
completion handler, which the SDK calls on a background thread. Hop to
the main thread before loading, and again after Prebid's fetchDemand,
as the usage guide does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jrosendahl-opt
jrosendahl-opt requested review from a team as code owners October 30, 2026 20:28
@jrosendahl-opt
jrosendahl-opt merged commit 2dfad07 into master Nov 3, 2026
4 checks passed
@jrosendahl-opt
jrosendahl-opt deleted the demo/main-thread-banner-loads branch November 3, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants