Skip to content

3.0.0

Latest

Choose a tag to compare

@dearhui dearhui released this 11 Jun 10:25
af1e4d1

A major release: Google Mobile Ads SDK 13, Swift 6 language mode, a unified async/await API, UMP consent management (GDPR) + ATT, pure-SwiftUI native ads, and self-sizing banners.

Upgrading? See MIGRATION.md — it covers both v2.x → v3 (deprecated shims remain until 4.0) and v1.2.3 → v3 paths.

Highlights

Requirements

  • iOS 15.0+, Google Mobile Ads SDK 13.5+, UserMessagingPlatform 3.0+ (new dependency)
  • Package compiles in Swift 6 language mode; coordinators and view models are @MainActor

Consent (UMP + ATT) — #15

  • await AdmobSwiftUI.initialize() now runs the full UMP consent flow before starting the SDK (.gatherFirst default, .manual to opt out)
  • ConsentManager: gatherConsent, presentPrivacyOptionsForm, requestTrackingAuthorization (ATT), @Published consentStatus, canRequestAds, isPrivacyOptionsRequired, EEA debug geography

Unified fullscreen coordinators — #12

  • FullScreenAdCoordinator: adState / isReady / load() / present(from:) / loadAndPresent(from:)
  • RewardedAdCoordinator.present(from:) suspends until the reward is earned and returns AdReward
  • AppOpenAdCoordinator: autoReloadsOnForeground + presentIfAvailable(from:), 4-hour expiration handling

Banners — #13

  • Self-sizing: no external .frame(height:) needed; anchored style upgraded to large anchored adaptive (video-capable)
  • New .collapsible(placement:) style and BannerAdEvent lifecycle callbacks via onAdEvent

Native ads — #14

  • All templates rewritten in SwiftUI; XIBs removed
  • Custom layout API: AdmobNativeAdContainer + NativeAdAssets (pre-bound, click-attributed components), .nativeAdAsset(_:), AdBadge
  • NativeAdView renders nothing until an ad loads and sizes itself

Quality — #16

  • 52 tests, GitHub Actions CI (package tests + demo build), DocC on all public APIs

Full details in the CHANGELOG. Verified end-to-end in a production app against 3.0.0-beta.1 (App Open, interstitial, inline banner, UMP→ATT flow).

🤖 Generated with Claude Code