Skip to content

fix(ios): IMA ad container resizing on orientation change#4771

Merged
moskalakamil merged 4 commits intoTheWidlarzGroup:support/6.x.xfrom
Ibad9:fix/ima-adcontainer-orientation
Mar 9, 2026
Merged

fix(ios): IMA ad container resizing on orientation change#4771
moskalakamil merged 4 commits intoTheWidlarzGroup:support/6.x.xfrom
Ibad9:fix/ima-adcontainer-orientation

Conversation

@Ibad9
Copy link
Copy Markdown

@Ibad9 Ibad9 commented Nov 11, 2025

Fixes an issue where the IMA ad container view did not resize correctly when device orientation changed on iOS.
Previously, adContainerView was initialised with a static frame (_video.bounds), so it didn’t update after rotation.

🛠️ Changes

Replaced frame-based layout with Auto Layout constraints to pin adContainerView to _video on all edges.
Ensures proper resizing on orientation change while retaining the existing memory leak fix.
Tested on iOS 15.1+ (iPhone simulators) — ads now stay correctly aligned after rotation.
✅ Verification

Verified that ads render correctly in both portrait and landscape modes.
Confirmed no new memory leaks or constraint warnings.
Maintains backward compatibility with existing React Native Video integrations.

Copy link
Copy Markdown

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

This PR fixes an issue where the IMA ad container view did not resize correctly when the device orientation changed on iOS. The solution replaces frame-based layout with Auto Layout constraints.

Key Changes:

  • Added Auto Layout constraints to pin the adContainerView to all edges of _video
  • Set translatesAutoresizingMaskIntoConstraints = false to enable constraint-based layout
  • Ensures the ad container properly resizes during orientation changes while preserving the existing memory leak fix

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

moskalakamil and others added 3 commits November 19, 2025 18:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


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

@moskalakamil moskalakamil changed the title Fix IMA ad container not resizing on orientation change (iOS) fix(ios): IMA ad container resizing on orientation change Mar 9, 2026
@moskalakamil moskalakamil merged commit fc936c4 into TheWidlarzGroup:support/6.x.x Mar 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants