Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add native ad compatibility layer #687

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

wjaykim
Copy link
Collaborator

@wjaykim wjaykim commented Jan 11, 2025

Description

Updated codes to include generated native code by codegen(Reference: https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries). By doing this, as the generated code is always included in npm artifact(and not rely on the app to run codegen for us), we can support lower react native(or @react-native/codegen) version.

Also I removed unnecessary constructor passing contexts in classes extending ViewGroupManager, which breaks android build in rn version lower than 0.75.

Related issues

Fixes #678

Release Summary

Checklist

  • I read the Contributor Guide
    and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in __tests__e2e__
    • jest tests added or updated in __tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-google-mobile-ads is great? Please consider supporting the project with any of the below:

  • 👉 Star this repo on GitHub ⭐️
  • 👉 Follow Invertase on Twitter

Updated codes to include generated native code by codegen(Reference: https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries).
By doing this, as the generated code is always included in npm artifact(and not rely on the app to run codegen for us), we can support lower react native(or @react-native/codegen) version.

Also removed unnecessary constructor passing contexts in classes extending ViewGroupManager, which breaks build in rn version lower than 0.75.

Fixes #678
Copy link

docs-page bot commented Jan 11, 2025

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

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

Documentation is deployed and generated using docs.page.

@wjaykim wjaykim marked this pull request as draft January 11, 2025 17:43
@wjaykim wjaykim marked this pull request as ready for review January 11, 2025 18:34
@wjaykim wjaykim marked this pull request as draft January 11, 2025 19:58
@wjaykim
Copy link
Collaborator Author

wjaykim commented Jan 11, 2025

Waiting for response of a issue about includesGeneratedCode option in facebook/react-native#48621, because build is still breaking with the option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant