Skip to content

About

React Native Google Mobile Ads enables you to monetize your app with AdMob.

Topics

Resources

Code of conduct

Contributing

Stars

1.0k stars

Watchers

17 watching

Forks

Latest commit

 

History

940 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


React Native Google Mobile Ads

npm downloads npm version docs.page New Architecture required Apache-2.0

Docs · Contribute

React Native Google Mobile Ads lets you monetize your app with Google AdMob or Google Ad Manager. It wraps the native Google Mobile Ads SDKs for iOS and Android.

Important

Use React Native 0.86 or newer with the New Architecture turned on. If the New Architecture is off, the native install fails. A missing app ID crashes startup or fails the build. The package has native code, so Expo Go cannot run it. Check out Prerequisites for more information.

Install

Prompt your agent:

Read https://docs.page/invertase/react-native-google-mobile-ads/prerequisites.md, then https://docs.page/invertase/react-native-google-mobile-ads/installation/expo.md (use …/installation/react-native.md for bare RN CLI), then https://docs.page/invertase/react-native-google-mobile-ads/consent-basics.md, https://docs.page/invertase/react-native-google-mobile-ads/initialization.md, and https://docs.page/invertase/react-native-google-mobile-ads/first-ad.md. After install, read node_modules/react-native-google-mobile-ads/AGENTS.md. React Native 0.86 or newer. New Architecture required. Consent before initialize. Test ad units until the integration is verified.

Or set it up yourself with Expo:

  1. Install the package. This also installs the development client.

    npx expo install react-native-google-mobile-ads expo-dev-client
  2. Add your AdMob app IDs to the config plugin in app.json, then create a development build. The module does not run in Expo Go.

    {
      "expo": {
        "plugins": [
          [
            "react-native-google-mobile-ads",
            {
              "androidAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx",
              "iosAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
            }
          ]
        ]
      }
    }
  3. Gather consent, initialize the SDK, and show your first ad. Getting Started is that path.

Bare React Native CLI projects start at Install with React Native CLI.

Consent and test ads

Before you initialize, gather consent. The Consent and privacy page and the Initialize the software development kit page describe that order.

Until you verify the integration, use test ad units. The Test ads page shows a test unit for one format.

Native implementation status

Every surface below works on the New Architecture. Surfaces marked To-Do still run through React Native's interoperability layer and have not yet been ported to a native Turbo Module or Fabric component. The port does not change the JavaScript API.

Platform Feature Status
iOS Mobile Ads SDK Methods (Turbo Native Module) ✅ Complete
iOS Banners (Fabric Native Component) ✅ Complete
iOS Full Screen Ads (Turbo Native Module) ✅ Complete
iOS Native Ads (Turbo Native Module, Fabric Native Component) ✅ Complete
iOS User Messaging Platform (Turbo Native Module) ✅ Complete
iOS EventEmitter (Turbo Native Module) ⏳ To-Do
Android Mobile Ads SDK Methods (Turbo Native Module) ⏳ To-Do
Android Banners (Fabric Native Component) 🟡 Partial: multi-format banner ported, standard banner To-Do
Android Full Screen Ads (Turbo Native Module) ⏳ To-Do
Android Native Ads (Turbo Native Module, Fabric Native Component) ✅ Complete
Android User Messaging Platform (Turbo Native Module) ⏳ To-Do
Android EventEmitter (Turbo Native Module) ⏳ To-Do

More information

Contributing

License

Apache-2.0. The terms are in the LICENSE file.


Invertase
Invertase builds and maintains this library.

About

React Native Google Mobile Ads enables you to monetize your app with AdMob.

Topics

Resources

Code of conduct

Contributing

Stars

1.0k stars

Watchers

17 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages