Skip to content

Commit

Permalink
fix(banner, ios): banner not destroyed in new arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dylancom committed Apr 27, 2024
1 parent d438bf2 commit 2d8bdb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ios/RNGoogleMobileAds/RNGoogleMobileAdsBannerView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ - (void)prepareForRecycle {
[super prepareForRecycle];
static const auto defaultProps = std::make_shared<const RNGoogleMobileAdsBannerViewProps>();
_props = defaultProps;

if (_banner) {
[_banner removeFromSuperview];
_banner = nil;
}
}

- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
Expand Down

0 comments on commit 2d8bdb5

Please sign in to comment.