@javascriptcommon/react-native-google-mobile-ads

中文文档
16.3.10发布于 2026/11/01Apache-2.0TypeScriptESM + CJS

Fork of react-native-google-mobile-ads migrated to the GMA Next-Gen SDK on Android (iOS keeps the classic Google Mobile Ads SDK). Banner, interstitial and app-open supported; native ads and rewarded are not migrated on Android.

原始使用文档
文档目录12 节
  1. React Native Google Mobile Ads (Next-Gen Android fork)
  2. Ad formats
  3. App open
  4. Banner
  5. Native
  6. Interstitial
  7. Rewarded
  8. Rewarded Interstitial
  9. Migrating to the New Architecture Status (backwards compati…
  10. Documentation
  11. Contributing
  12. License


React Native Google Mobile Ads (Next-Gen Android fork)

Fork notice — @javascriptcommon/react-native-google-mobile-ads migrates the Android native layer to the GMA Next-Gen SDK (ads-mobile-sdk). iOS is unchanged (classic GMA SDK). On Android only banner / interstitial / app-open / consent are implemented; native ads and rewarded are not. Same JS API as upstream.

NPM downloads NPM version License

Chat on Discord Follow on Twitter Follow on Facebook


React Native Google Mobile Ads allows you to monetize your app with AdMob; a React Native wrapper around the native Google-Mobile-Ads SDKs for both iOS and Android.

React Native Google Mobile Ads is built with three key principals in mind;

  • 🧪 Well tested
    • the module is extensively tested to >95% coverage (getting there after moving from react-native-firebase!)
  • 👁 Well typed
    • first class support for Typescript included
  • 📄 Well documented
    • full reference & installation documentation alongside detailed guides and FAQs

Ad formats

App open

App open ads are a special ad format intended for publishers wishing to monetize their app load screens.

App open ad

Learn More

Banner

Banner ad units display rectangular ads that occupy a portion of an app's layout. They stay on screen while users are interacting with the app, either anchored at the top or bottom of the screen or inline with content as the user scrolls. Banner ads can refresh automatically after a certain period of time.

Anchored adaptive

A dynamically sized banner that is full-width and auto-height. Anchored adaptive banners are expected to be always on-screen, locked to the screen’s top or bottom.

Anchored adaptive

Learn More

Inline adaptive

Inline adaptive banners are larger, taller banners compared to anchored adaptive banners. They are of variable height, and can be as tall as the device screen. They are intended to be placed in scrolling content.

Inline adaptive

Learn More

Collapsible

Collapsible banner ads are intended to improve performance of anchored ads that are otherwise a smaller size.

Collapsible banner

Learn More

Fixed size (legacy)

The Google Mobile Ads SDK supports fixed ad sizes for situations where adaptive banners ads don't meet your needs. Banner (320x50), Large banner (320x100), Medium rectangle (300x250), full banner (468x60) and leaderboard (728x90).

Learn More

Native

Native ads allow you to customize the look and feel of the ads that appear in your app. You decide how and where they're placed, so the layout is more consistent your app's design.

Native

Learn More

Interstitial

Interstitial ad units show full-page ads in your app. Place them at natural breaks & transitions in your app's interface, such as after level completion in a gaming app.

Interstitial

Learn More

Rewarded

AdMob rewarded ad units allow you to reward users with in-app items for interacting with video ads, playable ads, and surveys.

Rewarded

Learn More

Rewarded Interstitial

Rewarded interstitial is a type of incentivized ad format that allows you offer rewards for ads that appear automatically during natural app transitions. Unlike rewarded ads, users aren't required to opt-in to view a rewarded interstitial.

Rewarded interstitial

Learn More

Migrating to the New Architecture Status (backwards compatible)

This package can be used in both The Old and The New Architecture. When using The New Architecture, some legacy code will still be used though. See status below:

PlatformFeatureStatus
iOSMobile Ads SDK Methods (Turbo Native Module)✅ Complete
iOSBanners (Fabric Native Component)✅ Complete
iOSFull Screen Ads (Turbo Native Module)✅ Complete
iOSNative Ads (Turbo Native Module, Fabric Native Component)✅ Complete
iOSUser Messaging Platform (Turbo Native Module)✅ Complete
iOSEventEmitter (Turbo Native Module)⏳ To-Do
iOSRevenue Precision Constants (Turbo Native Module)✅ Complete
AndroidMobile Ads SDK Methods (Turbo Native Module)⏳ To-Do
AndroidBanners (Fabric Native Component)⏳ To-Do
AndroidFull Screen Ads (Turbo Native Module)⏳ To-Do
AndroidNative Ads (Turbo Native Module, Fabric Native Component)✅ Complete
AndroidUser Messaging Platform (Turbo Native Module)⏳ To-Do
AndroidEventEmitter (Turbo Native Module)⏳ To-Do
AndroidRevenue Precision Constants (Turbo Native Module)⏳ To-Do

Documentation

Contributing

License


Built and maintained by Invertase.

版本与发布记录

@javascriptcommon/react-native-google-mobile-ads 共发布 8 个版本,首次发布于 2026/06/24;过去 12 个月发布了 8 个版本。

版本发布日期距今
16.3.10latest2026/11/012 天前
16.3.92026/09/181 个月前
16.3.82026/09/161 个月前
16.3.72026/09/051 个月前
16.3.62026/08/062 个月前
16.3.52026/07/123 个月前

关于 @javascriptcommon/react-native-google-mobile-ads 的常见问题

@javascriptcommon/react-native-google-mobile-ads 是什么?

react-native-google-mobile-ads的分支迁移到Android上的GMA Next-Gen SDK (iOS保留了经典的谷歌Mobile Ads SDK)。支持横幅广告、插页广告和应用开放;原生广告和奖励并未移植到Android上。

如何安装 @javascriptcommon/react-native-google-mobile-ads?

在项目目录运行 npm install @javascriptcommon/react-native-google-mobile-ads,或使用 pnpm add / yarn add / bun add。

@javascriptcommon/react-native-google-mobile-ads 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@javascriptcommon/react-native-google-mobile-ads 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@javascriptcommon/react-native-google-mobile-ads 可以商用吗?

@javascriptcommon/react-native-google-mobile-ads 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@javascriptcommon/react-native-google-mobile-ads 还在维护吗?

最新版本 16.3.10 发布于 2026/11/01(2 天前);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2026/06/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。