---
title: Install with React Native CLI
description: Install and configure React Native Google Mobile Ads in a bare React Native project via autolinking and app.json.
---

This page is for **bare** React Native CLI projects (no Expo managed workflow).

**Prefer Expo?** Start with [Install with Expo](/installation/expo) (Expo + a development build) —
that is the recommended default path.

On bare React Native, the library **autolinks**. You configure AdMob App IDs in root `app.json`
(snake_case). You do **not** manually paste IDs into `Info.plist` / `AndroidManifest.xml`, edit
`AppDelegate` / `MainApplication`, or insert other native glue for a standard install.

## Install the package

```bash
npm install react-native-google-mobile-ads
```

## Configure your App IDs (`app.json`)

Before you can display ads you must have a [Google AdMob account](https://apps.admob.com) and an
App ID for each platform — see [Configuration](/configuration) for where to find the App ID.

**Single source for bare App IDs:** add them under the top-level `react-native-google-mobile-ads`
key in the project-root `app.json` (snake_case). Autolinking plus the Android Gradle / iOS config
scripts apply these during the native build — edit this JSON, then rebuild; do not hand-maintain a
second copy in native project files.

```json
// <project-root>/app.json
{
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}
```

<Warning>
  If `android_app_id` / `ios_app_id` are missing from that block, native build scripts warn and the
  Google Mobile Ads SDK can crash on startup. (Expo apps that set IDs only on the config plugin can
  ignore the same warning — see [Install with Expo](/installation/expo).)
</Warning>

For the changes to take effect, rebuild your project:

```bash
# For iOS
npx pod-install
npx react-native run-ios

# For Android
npx react-native run-android
```

Full key reference (including Expo camelCase parity): [Config plugin reference](/config-plugin).

### iOS packaging and frameworks (CocoaPods)

This module ships as a **CocoaPods** pod only. There is no Swift Package Manager (`Package.swift`) distribution yet.
Until SPM packaging lands, integrate it through CocoaPods (including Expo prebuild / Continuous Native Generation, which still resolve native modules via CocoaPods).

By default the podspec sets `static_framework` to `false`, so under CocoaPods `use_frameworks!` the module follows **dynamic** linkage unless you opt into static frameworks below.
That default aligns with dynamic `use_frameworks! :linkage => :dynamic`.
It does **not** replace a future SPM package for apps that consume React Native Firebase (or other dependencies) via SPM only.

#### Optionally configure iOS static frameworks

This module does **not** require static frameworks for a normal bare install. Use them only when
another dependency intentionally needs `use_frameworks! :linkage => :static` in your `Podfile`
(for a need unrelated to React Native Firebase).

<Warning>
  Coexistence with React Native Firebase is covered on [Using with React Native
  Firebase](/firebase). Prefer RNFB's modern **dynamic Podfile + static ads pod** hybrid there — not
  fully static frameworks for the whole Podfile alone.
</Warning>

On **bare**, when you do enable static frameworks, set `$RNGoogleMobileAdsAsStaticFramework = true`
in the `Podfile` **before** any target block / `use_native_modules!` / `use_react_native!`, then run
`pod install` again. Expo uses `expo-build-properties` instead — see
[Install with Expo](/installation/expo#optionally-configure-ios-static-frameworks):

```ruby
$RNGoogleMobileAdsAsStaticFramework = true
```

## Enable SKAdNetwork to track conversions (iOS)

The Google Mobile Ads SDK supports conversion tracking using Apple's SKAdNetwork, which lets Google
and participating third-party buyers attribute an app install even when the IDFA is not available.
Add the advised
[SKAdNetwork identifiers](https://developers.google.com/admob/ios/3p-skadnetworks)
to your project as described below. Note that these identifiers are subject to change and should be
updated regularly.

```json
// <project-root>/app.json
{
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "sk_ad_network_items": [
      "cstr6suwn9.skadnetwork",
      "4fzdc2evr5.skadnetwork",
      "2fnua5tdw4.skadnetwork",
      "ydx93a7ass.skadnetwork",
      "p78axxw29g.skadnetwork",
      "v72qych5uu.skadnetwork",
      "ludvb6z3bs.skadnetwork",
      "cp8zw746q7.skadnetwork",
      "3sh42y64q3.skadnetwork",
      "c6k4g5qg8m.skadnetwork",
      "s39g8k73mm.skadnetwork",
      "wg4vff78zm.skadnetwork",
      "3qy4746246.skadnetwork",
      "f38h382jlk.skadnetwork",
      "hs6bdukanm.skadnetwork",
      "mlmmfzh3r3.skadnetwork",
      "v4nxqhlyqp.skadnetwork",
      "wzmmz9fp6w.skadnetwork",
      "su67r6k2v3.skadnetwork",
      "yclnxrl5pm.skadnetwork",
      "t38b2kh725.skadnetwork",
      "7ug5zh24hu.skadnetwork",
      "gta9lk7p23.skadnetwork",
      "vutu7akeur.skadnetwork",
      "y5ghdn5j9k.skadnetwork",
      "v9wttpbfk9.skadnetwork",
      "n38lu8286q.skadnetwork",
      "47vhws6wlr.skadnetwork",
      "kbd757ywx3.skadnetwork",
      "9t245vhmpl.skadnetwork",
      "a2p9lx4jpn.skadnetwork",
      "22mmun2rn5.skadnetwork",
      "44jx6755aq.skadnetwork",
      "k674qkevps.skadnetwork",
      "4468km3ulz.skadnetwork",
      "2u9pt9hc89.skadnetwork",
      "8s468mfl3y.skadnetwork",
      "klf5c3l5u5.skadnetwork",
      "ppxm28t8ap.skadnetwork",
      "kbmxgpxpgc.skadnetwork",
      "uw77j35x4d.skadnetwork",
      "578prtvx9j.skadnetwork",
      "4dzt52r2t5.skadnetwork",
      "tl55sbb4fm.skadnetwork",
      "c3frkrj4fj.skadnetwork",
      "e5fvkxwrpn.skadnetwork",
      "8c4e2ghe7u.skadnetwork",
      "3rd42ekr43.skadnetwork",
      "97r2b46745.skadnetwork",
      "3qcr597p9d.skadnetwork"
    ]
  }
}
```

## App Tracking Transparency (iOS)

Apple requires apps to display the App Tracking Transparency authorization request for accessing the
IDFA (leaving the choice to the user, whether to use personalized or non-personalized ads). Within
your project's configuration file, you have to provide a user tracking usage description:

```json
// <project-root>/app.json
{
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "user_tracking_usage_description": "This identifier will be used to deliver personalized ads to you."
  }
}
```

See [Consent & privacy basics](/consent-basics) for how to request App Tracking Transparency
authorization at runtime.

## iOS App ID Build Phase (`ios_config.sh`)

CocoaPods installs an Xcode Build Phase (`[RNGoogleMobileAds] Configuration`) that writes `GADApplicationIdentifier` into the built app `Info.plist` from `app.json`.

If a release build fails with `unable to locate Info.plist`, upgrade this package and
re-run `pod install` so the embedded `ios_config.sh` polls briefly for
`$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)` before failing (Xcode can start the phase
before Process Info.plist finishes writing that file). Phase timing metadata alone is
not enough. Do not move that script earlier in Build Phases. Expo apps that use the
config plugin below set the App ID at prebuild time and do not rely on this Build Phase.
