invertase/react-native-google-mobile-ads
소개
React Native Google Mobile Ads를 사용하면 AdMob으로 앱을 수익화할 수 있습니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- +3
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalReact Native Google Mobile Ads
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:
Install the package. This also installs the development client.
npx expo install react-native-google-mobile-ads expo-dev-clientAdd 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" } ] ] } }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) | ✅ Complete |
| Android | EventEmitter (Turbo Native Module) | ⏳ To-Do |
More information
- Ad formats to understand each format.
- Migrating to v17 to upgrade from an older release.
- Reference API to read the generated reference.
Contributing
License
Apache-2.0. The terms are in the LICENSE file.
관련 프로젝트 살펴보기
불러오는 중…