Skip to content

Implement iOS MREC ad support#23

Merged
steffanc merged 4 commits intomainfrom
feat/ios-mrecs-v2
Feb 21, 2026
Merged

Implement iOS MREC ad support#23
steffanc merged 4 commits intomainfrom
feat/ios-mrecs-v2

Conversation

@steffanc
Copy link
Contributor

Summary

  • Implement full MREC ad lifecycle on iOS (create, show, hide, load, destroy, position, auto-refresh, placement, custom data)
  • Refactor banner methods to use shared ad view helpers (createAdView, showAdView, hideAdView, updateAdViewPosition, loadAdView, startAdViewAutoRefresh, stopAdViewAutoRefresh, destroyAdView)
  • Both banner and MREC have their own top-level methods that delegate to shared helpers, matching the Android plugin pattern

Test plan

  • Build on iOS simulator — verify no compile errors
  • Load and show MREC at each position (center, top_left, bottom_center, etc.)
  • Test MREC auto-refresh start/stop
  • Test MREC destroy lifecycle
  • Verify banners still work after refactor

🤖 Generated with Claude Code

Refactor banner methods to use shared helpers (createAdView, showAdView,
hideAdView, etc.) and add full MREC support following the same pattern
as Android. Both formats have their own top-level methods that extract
args and delegate to shared helpers parameterized by adType.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements iOS-side support for MREC ads and refactors banner/MREC implementations to share common ad view lifecycle helpers, aligning the iOS plugin structure with the Android plugin pattern.

Changes:

  • Adds full iOS method-channel handling for MREC lifecycle APIs (create/show/hide/load/destroy/position/auto-refresh/placement/custom data).
  • Refactors banner lifecycle APIs to delegate into shared ad-view helper methods.
  • Introduces shared helpers (createAdView, showAdView, hideAdView, updateAdViewPosition, loadAdView, startAdViewAutoRefresh, stopAdViewAutoRefresh, destroyAdView) used by both Banner and MREC.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

steffanc and others added 3 commits February 21, 2026 10:29
Prevents accidental clicks on empty ad views by setting
userInteractionEnabled = NO at creation, then enabling it
in didLoadAd after a real ad is present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoids redundant rootViewController lookup in the shared helper
since callers already fetched and nil-checked it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move NSNull→nil conversion into setAdViewPlacement: and
  setAdViewCustomData: shared helpers, reducing duplication between
  Banner and MREC methods
- Add success log line to loadAdView: for consistency with other helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steffanc steffanc merged commit 8ae06cd into main Feb 21, 2026
2 checks passed
@steffanc steffanc deleted the feat/ios-mrecs-v2 branch February 21, 2026 18:47
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