Skip to content

fix: Fabric codegen support for new arch#792

Merged
dylancom merged 1 commit intoinvertase:mainfrom
globemediaofficial:fix/fabric-codegen
Aug 23, 2025
Merged

fix: Fabric codegen support for new arch#792
dylancom merged 1 commit intoinvertase:mainfrom
globemediaofficial:fix/fabric-codegen

Conversation

@globemediaofficial
Copy link

Description

The native ad components were incorrectly implemented for React Native 0.81 with the new architecture enabled. Legacy components were being used, which caused a crash in recent versions. This PR fixes that crash by correcting the codegen and editing the native code so that ViewManager (legacy) implementations are only used for the old architecture.

Related issues

Fixes #777

Release Summary

  • Corrects native ad component implementation for RN 0.81 with new architecture.
  • Ensures compatibility with both legacy and new Fabric architectures on iOS.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • iOS

Test Plan

  • Verified that the app no longer crashes on iOS.
  • All native ad components display correctly, including the AdMob native ad validator.
image

@docs-page
Copy link

docs-page bot commented Aug 23, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/react-native-google-mobile-ads~792

Documentation is deployed and generated using docs.page.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dylancom
Copy link
Collaborator

Awesome, great work!

@codecov
Copy link

codecov bot commented Aug 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.34%. Comparing base (a34c7ba) to head (63c1330).
⚠️ Report is 164 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
- Coverage   43.72%   36.34%   -7.37%     
==========================================
  Files          30       37       +7     
  Lines         549      677     +128     
  Branches      151      180      +29     
==========================================
+ Hits          240      246       +6     
- Misses        309      431     +122     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dylancom dylancom merged commit 196ec16 into invertase:main Aug 23, 2025
10 of 11 checks passed
@dylancom
Copy link
Collaborator

dylancom commented Aug 23, 2025

@globemediaofficial why did you add the NativeViewManager interface by the way? It's already defined in the header file.

@globemediaofficial
Copy link
Author

@dylancom Not sure how that got added... probably an accidental paste. You’re right, it’s a duplicate, so it can be removed. Sorry about that!

@mikehardy
Copy link
Collaborator

🎉 This PR is included in version 15.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants