Skip to content

Commit

Permalink
docs: clarify app.config.*s files are supported
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn authored and dylancom committed Aug 19, 2024
1 parent 742c6a0 commit 1bb9695
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions docs/european-user-consent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ For Android, add the following rule into `android/app/proguard-rules.pro`:
</TabItem>
<TabItem value="expo">

Add the `extraProguardRules` property to `app.json` file as described in the [Expo documentation](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):
Add the `extraProguardRules` property to `app.json`, `app.config.js`, or `app.config.ts` file as described in the [Expo documentation](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):

```json
// <project-root>/app.json
{
"expo": {
"plugins": [
Expand Down Expand Up @@ -82,7 +83,7 @@ Within your projects `app.json` file, set the `delay_app_measurement_init` to `t
</TabItem>
<TabItem value="expo">

Within your projects `app.json` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:
Within your projects `app.json`, `app.config.js`, or `app.config.ts` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:

```json
// <project-root>/app.json
Expand Down Expand Up @@ -111,7 +112,7 @@ Once set, rebuild your application.

If you configure an [ATT message](https://support.google.com/admob/answer/10115331) in your Google AdMob account, the UMP SDK will automatically handle the ATT alert.
This will also show an IDFA explainer message. If you don't want to show an explainer message you can show the ATT alert [manually](https://docs.page/invertase/react-native-google-mobile-ads#app-tracking-transparency-ios).
Also, within your projects `app.json` file, you have to provide a user tracking usage description (once set, rebuild your application):
Also, within your projects configuration file, you have to provide a user tracking usage description (once set, rebuild your application):

<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
<TabItem value="bare">
Expand Down
12 changes: 6 additions & 6 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To enable static frameworks, you must add the variable `$RNGoogleMobileAdsAsStat
<TabItem value="expo">

Expo users may enable static frameworks by using the `expo-build-properties` plugin.
To do so [follow the official `expo-build-properties` installation instructions](https://docs.expo.dev/versions/latest/sdk/build-properties/) and merge the following code into your `app.json` file:
To do so [follow the official `expo-build-properties` installation instructions](https://docs.expo.dev/versions/latest/sdk/build-properties/) and merge the following code into your `app.json`, `app.config.js`, or `app.config.ts` file:

```json
// <project-root>/app.json
Expand Down Expand Up @@ -81,15 +81,15 @@ Before you are able to display ads to your users, you must have a [Google AdMob
be added to the project.

<Warning>
Attempting to build your app without a valid App ID in `app.json` will cause the app to crash on start or fail to build.
Attempting to build your app without configuring a valid App ID for this package will cause the app to crash on start or fail to build.
</Warning>

Under the "App settings" menu item, you can find the "App ID":

![Google AdMob App ID](https://prismic-io.s3.amazonaws.com/invertase%2F52dd6900-108c-47a6-accb-699fde963b99_new+project+%2813%29.jpg)

The app IDs for Android and iOS need to be inserted into your apps native code.
For React Native projects without Expo, you can add the app IDs to the `app.json` file.
For bare React Native projects, you can add the app IDs to the `app.json` file.
For Expo projects, we provide an [Expo config plugin](https://docs.expo.dev/config-plugins/introduction/).


Expand Down Expand Up @@ -120,7 +120,7 @@ npx react-native run-android
</TabItem>
<TabItem value="expo">

This library contains an Expo config plugin which you must add to your `app.json` file.
This library contains an Expo config plugin which you must add to your `app.json`, `app.config.js`, or `app.config.ts` file.
For these changes to take effect, your must rebuild your project's native code and install the new build on your device.

```json
Expand Down Expand Up @@ -228,7 +228,7 @@ If you are using mediation, you may wish to wait until the promise is settled be
### 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.
Within your projects `app.json` file, add the advised [SKAdNetwork identifiers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks).
Add the advised [SKAdNetwork identifiers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks) to your project as described below.
Note that these identifiers are subject to change and should be updated regularly.

<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
Expand Down Expand Up @@ -372,7 +372,7 @@ Note that these identifiers are subject to change and should be updated regularl
### 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 projects `app.json` file, you have to provide a user tracking usage description:
Within your projects configuration file, you have to provide a user tracking usage description:

<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
<TabItem value="bare">
Expand Down

0 comments on commit 1bb9695

Please sign in to comment.