react-native-google-mobile-ads 14.2.2 → 14.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/european-user-consent.mdx +4 -3
- package/docs/index.mdx +6 -6
- package/lib/commonjs/validateAdRequestOptions.js +3 -0
- package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/validateAdRequestOptions.js +3 -0
- package/lib/module/validateAdRequestOptions.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/validateAdRequestOptions.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/plugin/__tests__/__snapshots__/plugin.test.ts.snap +278 -0
- package/plugin/__tests__/fixtures/app.config.js +24 -0
- package/plugin/__tests__/fixtures/app.config.ts +24 -0
- package/plugin/__tests__/fixtures/without-params/app.config.js +11 -0
- package/plugin/__tests__/fixtures/without-params/app.config.ts +11 -0
- package/plugin/__tests__/plugin.test.ts +13 -10
- package/src/validateAdRequestOptions.ts +3 -0
- package/src/version.ts +1 -1
- /package/plugin/__tests__/fixtures/{app-without-params.json → without-params/app.json} +0 -0
|
@@ -34,9 +34,10 @@ For Android, add the following rule into `android/app/proguard-rules.pro`:
|
|
|
34
34
|
</TabItem>
|
|
35
35
|
<TabItem value="expo">
|
|
36
36
|
|
|
37
|
-
Add the `extraProguardRules` property to `app.json` file as described in the [Expo documentation](https://docs.expo.dev/versions/latest/sdk/build-properties/#pluginconfigtypeandroid):
|
|
37
|
+
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):
|
|
38
38
|
|
|
39
39
|
```json
|
|
40
|
+
// <project-root>/app.json
|
|
40
41
|
{
|
|
41
42
|
"expo": {
|
|
42
43
|
"plugins": [
|
|
@@ -82,7 +83,7 @@ Within your projects `app.json` file, set the `delay_app_measurement_init` to `t
|
|
|
82
83
|
</TabItem>
|
|
83
84
|
<TabItem value="expo">
|
|
84
85
|
|
|
85
|
-
Within your projects `app.json` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:
|
|
86
|
+
Within your projects `app.json`, `app.config.js`, or `app.config.ts` file, set the `delayAppMeasurementInit` to `true` to delay app measurement:
|
|
86
87
|
|
|
87
88
|
```json
|
|
88
89
|
// <project-root>/app.json
|
|
@@ -111,7 +112,7 @@ Once set, rebuild your application.
|
|
|
111
112
|
|
|
112
113
|
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.
|
|
113
114
|
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).
|
|
114
|
-
Also, within your projects
|
|
115
|
+
Also, within your projects configuration file, you have to provide a user tracking usage description (once set, rebuild your application):
|
|
115
116
|
|
|
116
117
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
117
118
|
<TabItem value="bare">
|
package/docs/index.mdx
CHANGED
|
@@ -51,7 +51,7 @@ To enable static frameworks, you must add the variable `$RNGoogleMobileAdsAsStat
|
|
|
51
51
|
<TabItem value="expo">
|
|
52
52
|
|
|
53
53
|
Expo users may enable static frameworks by using the `expo-build-properties` plugin.
|
|
54
|
-
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:
|
|
54
|
+
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:
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
// <project-root>/app.json
|
|
@@ -81,7 +81,7 @@ Before you are able to display ads to your users, you must have a [Google AdMob
|
|
|
81
81
|
be added to the project.
|
|
82
82
|
|
|
83
83
|
<Warning>
|
|
84
|
-
Attempting to build your app without a valid App ID
|
|
84
|
+
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.
|
|
85
85
|
</Warning>
|
|
86
86
|
|
|
87
87
|
Under the "App settings" menu item, you can find the "App ID":
|
|
@@ -89,7 +89,7 @@ Under the "App settings" menu item, you can find the "App ID":
|
|
|
89
89
|

|
|
90
90
|
|
|
91
91
|
The app IDs for Android and iOS need to be inserted into your apps native code.
|
|
92
|
-
For React Native projects
|
|
92
|
+
For bare React Native projects, you can add the app IDs to the `app.json` file.
|
|
93
93
|
For Expo projects, we provide an [Expo config plugin](https://docs.expo.dev/config-plugins/introduction/).
|
|
94
94
|
|
|
95
95
|
|
|
@@ -120,7 +120,7 @@ npx react-native run-android
|
|
|
120
120
|
</TabItem>
|
|
121
121
|
<TabItem value="expo">
|
|
122
122
|
|
|
123
|
-
This library contains an Expo config plugin which you must add to your `app.json` file.
|
|
123
|
+
This library contains an Expo config plugin which you must add to your `app.json`, `app.config.js`, or `app.config.ts` file.
|
|
124
124
|
For these changes to take effect, your must rebuild your project's native code and install the new build on your device.
|
|
125
125
|
|
|
126
126
|
```json
|
|
@@ -228,7 +228,7 @@ If you are using mediation, you may wish to wait until the promise is settled be
|
|
|
228
228
|
### Enable SKAdNetwork to track conversions (iOS)
|
|
229
229
|
|
|
230
230
|
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.
|
|
231
|
-
|
|
231
|
+
Add the advised [SKAdNetwork identifiers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks) to your project as described below.
|
|
232
232
|
Note that these identifiers are subject to change and should be updated regularly.
|
|
233
233
|
|
|
234
234
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
@@ -372,7 +372,7 @@ Note that these identifiers are subject to change and should be updated regularl
|
|
|
372
372
|
### App Tracking Transparency (iOS)
|
|
373
373
|
|
|
374
374
|
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).
|
|
375
|
-
Within your projects
|
|
375
|
+
Within your projects configuration file, you have to provide a user tracking usage description:
|
|
376
376
|
|
|
377
377
|
<Tabs groupId="framework" values={[{label: 'React Native', value: 'bare'}, {label: 'Expo', value: 'expo'}]}>
|
|
378
378
|
<TabItem value="bare">
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.validateAdRequestOptions = validateAdRequestOptions;
|
|
7
7
|
var _common = require("./common");
|
|
8
|
+
var _version = require("./version");
|
|
8
9
|
/*
|
|
9
10
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
11
|
*
|
|
@@ -76,6 +77,8 @@ function validateAdRequestOptions(options) {
|
|
|
76
77
|
throw new Error("'options.requestAgent' expected a string value");
|
|
77
78
|
}
|
|
78
79
|
out.requestAgent = options.requestAgent;
|
|
80
|
+
} else {
|
|
81
|
+
out.requestAgent = `rn-invertase-${_version.version}`;
|
|
79
82
|
}
|
|
80
83
|
if (options.serverSideVerificationOptions) {
|
|
81
84
|
if (!(0, _common.isObject)(options.serverSideVerificationOptions)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_common","require","validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_common","require","_version","validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","version","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AA1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcO,SAASE,wBAAwBA,CAACC,OAAwB,EAAE;EACjE,MAAMC,GAAmB,GAAG,CAAC,CAAC;EAE9B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,+BAA+B,CAAC,EAAE;IAC3D,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,CAACO,6BAA6B,CAAC,EAAE;MACrD,MAAM,IAAIH,KAAK,CAAC,kEAAkE,CAAC;IACrF;IAEAH,GAAG,CAACM,6BAA6B,GAAGP,OAAO,CAACO,6BAA6B;EAC3E;EAEA,IAAIP,OAAO,CAACQ,aAAa,EAAE;IACzB,IAAI,CAAC,IAAAL,gBAAQ,EAACH,OAAO,CAACQ,aAAa,CAAC,EAAE;MACpC,MAAM,IAAIJ,KAAK,CAAC,+DAA+D,CAAC;IAClF;IAEAK,MAAM,CAACC,OAAO,CAACV,OAAO,CAACQ,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MAC9D,IAAI,CAAC,IAAAC,gBAAQ,EAACD,KAAK,CAAC,EAAE;QACpB,MAAM,IAAIT,KAAK,CAAC,mEAAmEQ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List":[]}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { isPropertySet, isArray, isBoolean, isObject, isString, isUndefined, isValidUrl } from './common';
|
|
19
|
+
import { version } from './version';
|
|
19
20
|
export function validateAdRequestOptions(options) {
|
|
20
21
|
const out = {};
|
|
21
22
|
if (isUndefined(options)) {
|
|
@@ -70,6 +71,8 @@ export function validateAdRequestOptions(options) {
|
|
|
70
71
|
throw new Error("'options.requestAgent' expected a string value");
|
|
71
72
|
}
|
|
72
73
|
out.requestAgent = options.requestAgent;
|
|
74
|
+
} else {
|
|
75
|
+
out.requestAgent = `rn-invertase-${version}`;
|
|
73
76
|
}
|
|
74
77
|
if (options.serverSideVerificationOptions) {
|
|
75
78
|
if (!isObject(options.serverSideVerificationOptions)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","isString","isUndefined","isValidUrl","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,OAAO,EACPC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,UAAU,QACL,UAAU;
|
|
1
|
+
{"version":3,"names":["isPropertySet","isArray","isBoolean","isObject","isString","isUndefined","isValidUrl","version","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validate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B,QAAQ,CAACM,OAAO,CAACgB,6BAA6B,CAAC,EAAE;MACpD,MAAM,IAAId,KAAK,CACb,+EACF,CAAC;IACH;IAEA,MAAMe,UAAU,GAAGjB,OAAO,CAACgB,6BAA6B;IAExD,IAAIC,UAAU,CAACC,MAAM,IAAI,CAACvB,QAAQ,CAACsB,UAAU,CAACC,MAAM,CAAC,EAAE;MACrD,MAAM,IAAIhB,KAAK,CAAC,wEAAwE,CAAC;IAC3F;IAEA,IAAIe,UAAU,CAACE,UAAU,IAAI,CAACxB,QAAQ,CAACsB,UAAU,CAACE,UAAU,CAAC,EAAE;MAC7D,MAAM,IAAIjB,KAAK,CAAC,4EAA4E,CAAC;IAC/F;IAEAD,GAAG,CAACe,6BAA6B,GAAGhB,OAAO,CAACgB,6BAA6B;EAC3E;EAEA,IAAIhB,OAAO,CAACoB,eAAe,EAAE;IAC3B,IAAI,CAAC1B,QAAQ,CAACM,OAAO,CAACoB,eAAe,CAAC,EAAE;MACtC,MAAM,IAAIlB,KAAK,CAAC,iEAAiE,CAAC;IACpF;IACAD,GAAG,CAACmB,eAAe,GAAGpB,OAAO,CAACoB,eAAe;EAC/C;EAEA,IAAIpB,OAAO,CAACqB,mBAAmB,EAAE;IAC/B,IAAI,CAAC1B,QAAQ,CAACK,OAAO,CAACqB,mBAAmB,CAAC,EAAE;MAC1C,MAAM,IAAInB,KAAK,CAAC,uDAAuD,CAAC;IAC1E;IACAD,GAAG,CAACoB,mBAAmB,GAAGrB,OAAO,CAACqB,mBAAmB;EACvD;EAEA,OAAOpB,GAAG;AACZ","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "14.2.
|
|
1
|
+
export declare const SDK_VERSION = "14.2.3";
|
|
2
2
|
export { default, MobileAds } from './MobileAds';
|
|
3
3
|
export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
|
|
4
4
|
export { AdsConsentPurposes } from './AdsConsentPurposes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateAdRequestOptions.d.ts","sourceRoot":"","sources":["../../src/validateAdRequestOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateAdRequestOptions.d.ts","sourceRoot":"","sources":["../../src/validateAdRequestOptions.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,cAAc,kBA8GhE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "14.2.
|
|
1
|
+
export declare const version = "14.2.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-mobile-ads",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.3",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -41,6 +41,88 @@ exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml 1`] = `
|
|
|
41
41
|
</manifest>"
|
|
42
42
|
`;
|
|
43
43
|
|
|
44
|
+
exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml 2`] = `
|
|
45
|
+
"<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" xmlns:tools="http://schemas.android.com/tools">
|
|
46
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
47
|
+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
|
48
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
49
|
+
<uses-permission android:name="android.permission.VIBRATE"/>
|
|
50
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
51
|
+
<queries>
|
|
52
|
+
<intent>
|
|
53
|
+
<action android:name="android.intent.action.VIEW"/>
|
|
54
|
+
<category android:name="android.intent.category.BROWSABLE"/>
|
|
55
|
+
<data android:scheme="https"/>
|
|
56
|
+
</intent>
|
|
57
|
+
</queries>
|
|
58
|
+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
|
|
59
|
+
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="TestAppId" tools:replace="android:value"/>
|
|
60
|
+
<meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true" tools:replace="android:value"/>
|
|
61
|
+
<meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true" tools:replace="android:value"/>
|
|
62
|
+
<meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true" tools:replace="android:value"/>
|
|
63
|
+
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
|
|
64
|
+
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
|
|
65
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
|
66
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
|
67
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/example"/>
|
|
68
|
+
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
|
|
69
|
+
<intent-filter>
|
|
70
|
+
<action android:name="android.intent.action.MAIN"/>
|
|
71
|
+
<category android:name="android.intent.category.LAUNCHER"/>
|
|
72
|
+
</intent-filter>
|
|
73
|
+
<intent-filter>
|
|
74
|
+
<action android:name="android.intent.action.VIEW"/>
|
|
75
|
+
<category android:name="android.intent.category.DEFAULT"/>
|
|
76
|
+
<category android:name="android.intent.category.BROWSABLE"/>
|
|
77
|
+
<data android:scheme="com.example"/>
|
|
78
|
+
</intent-filter>
|
|
79
|
+
</activity>
|
|
80
|
+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
|
|
81
|
+
</application>
|
|
82
|
+
</manifest>"
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml 3`] = `
|
|
86
|
+
"<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" xmlns:tools="http://schemas.android.com/tools">
|
|
87
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
88
|
+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
|
89
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
90
|
+
<uses-permission android:name="android.permission.VIBRATE"/>
|
|
91
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
92
|
+
<queries>
|
|
93
|
+
<intent>
|
|
94
|
+
<action android:name="android.intent.action.VIEW"/>
|
|
95
|
+
<category android:name="android.intent.category.BROWSABLE"/>
|
|
96
|
+
<data android:scheme="https"/>
|
|
97
|
+
</intent>
|
|
98
|
+
</queries>
|
|
99
|
+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
|
|
100
|
+
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="TestAppId" tools:replace="android:value"/>
|
|
101
|
+
<meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true" tools:replace="android:value"/>
|
|
102
|
+
<meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true" tools:replace="android:value"/>
|
|
103
|
+
<meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true" tools:replace="android:value"/>
|
|
104
|
+
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
|
|
105
|
+
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
|
|
106
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
|
107
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
|
108
|
+
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/example"/>
|
|
109
|
+
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
|
|
110
|
+
<intent-filter>
|
|
111
|
+
<action android:name="android.intent.action.MAIN"/>
|
|
112
|
+
<category android:name="android.intent.category.LAUNCHER"/>
|
|
113
|
+
</intent-filter>
|
|
114
|
+
<intent-filter>
|
|
115
|
+
<action android:name="android.intent.action.VIEW"/>
|
|
116
|
+
<category android:name="android.intent.category.DEFAULT"/>
|
|
117
|
+
<category android:name="android.intent.category.BROWSABLE"/>
|
|
118
|
+
<data android:scheme="com.example"/>
|
|
119
|
+
</intent-filter>
|
|
120
|
+
</activity>
|
|
121
|
+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
|
|
122
|
+
</application>
|
|
123
|
+
</manifest>"
|
|
124
|
+
`;
|
|
125
|
+
|
|
44
126
|
exports[`Expo Config Plugin Tests Should modify Info.plist 1`] = `
|
|
45
127
|
"<?xml version="1.0" encoding="UTF-8"?>
|
|
46
128
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -138,3 +220,199 @@ exports[`Expo Config Plugin Tests Should modify Info.plist 1`] = `
|
|
|
138
220
|
</dict>
|
|
139
221
|
</plist>"
|
|
140
222
|
`;
|
|
223
|
+
|
|
224
|
+
exports[`Expo Config Plugin Tests Should modify Info.plist 2`] = `
|
|
225
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
226
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
227
|
+
<plist version="1.0">
|
|
228
|
+
<dict>
|
|
229
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
230
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
231
|
+
<key>CFBundleDisplayName</key>
|
|
232
|
+
<string>example</string>
|
|
233
|
+
<key>CFBundleExecutable</key>
|
|
234
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
235
|
+
<key>CFBundleIdentifier</key>
|
|
236
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
237
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
238
|
+
<string>6.0</string>
|
|
239
|
+
<key>CFBundleName</key>
|
|
240
|
+
<string>$(PRODUCT_NAME)</string>
|
|
241
|
+
<key>CFBundlePackageType</key>
|
|
242
|
+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
243
|
+
<key>CFBundleShortVersionString</key>
|
|
244
|
+
<string>1.0.0</string>
|
|
245
|
+
<key>CFBundleSignature</key>
|
|
246
|
+
<string>????</string>
|
|
247
|
+
<key>CFBundleURLTypes</key>
|
|
248
|
+
<array>
|
|
249
|
+
<dict>
|
|
250
|
+
<key>CFBundleURLSchemes</key>
|
|
251
|
+
<array>
|
|
252
|
+
<string>com.example</string>
|
|
253
|
+
</array>
|
|
254
|
+
</dict>
|
|
255
|
+
</array>
|
|
256
|
+
<key>CFBundleVersion</key>
|
|
257
|
+
<string>1</string>
|
|
258
|
+
<key>GADApplicationIdentifier</key>
|
|
259
|
+
<string>TestIosId</string>
|
|
260
|
+
<key>GADDelayAppMeasurementInit</key>
|
|
261
|
+
<true/>
|
|
262
|
+
<key>LSRequiresIPhoneOS</key>
|
|
263
|
+
<true/>
|
|
264
|
+
<key>NSAppTransportSecurity</key>
|
|
265
|
+
<dict>
|
|
266
|
+
<key>NSAllowsArbitraryLoads</key>
|
|
267
|
+
<true/>
|
|
268
|
+
<key>NSExceptionDomains</key>
|
|
269
|
+
<dict>
|
|
270
|
+
<key>localhost</key>
|
|
271
|
+
<dict>
|
|
272
|
+
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
273
|
+
<true/>
|
|
274
|
+
</dict>
|
|
275
|
+
</dict>
|
|
276
|
+
</dict>
|
|
277
|
+
<key>NSUserTrackingUsageDescription</key>
|
|
278
|
+
<string>TestUserTrackingUsageDescription</string>
|
|
279
|
+
<key>SKAdNetworkItems</key>
|
|
280
|
+
<array>
|
|
281
|
+
<dict>
|
|
282
|
+
<key>SKAdNetworkIdentifier</key>
|
|
283
|
+
<string>TestSkAdNetworkItem1</string>
|
|
284
|
+
</dict>
|
|
285
|
+
<dict>
|
|
286
|
+
<key>SKAdNetworkIdentifier</key>
|
|
287
|
+
<string>TestSkAdNetworkItem2</string>
|
|
288
|
+
</dict>
|
|
289
|
+
</array>
|
|
290
|
+
<key>UILaunchStoryboardName</key>
|
|
291
|
+
<string>SplashScreen</string>
|
|
292
|
+
<key>UIRequiredDeviceCapabilities</key>
|
|
293
|
+
<array>
|
|
294
|
+
<string>armv7</string>
|
|
295
|
+
</array>
|
|
296
|
+
<key>UIRequiresFullScreen</key>
|
|
297
|
+
<false/>
|
|
298
|
+
<key>UIStatusBarStyle</key>
|
|
299
|
+
<string>UIStatusBarStyleDefault</string>
|
|
300
|
+
<key>UISupportedInterfaceOrientations</key>
|
|
301
|
+
<array>
|
|
302
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
303
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
304
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
305
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
306
|
+
</array>
|
|
307
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
308
|
+
<array>
|
|
309
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
310
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
311
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
312
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
313
|
+
</array>
|
|
314
|
+
<key>UIUserInterfaceStyle</key>
|
|
315
|
+
<string>Light</string>
|
|
316
|
+
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
317
|
+
<false/>
|
|
318
|
+
</dict>
|
|
319
|
+
</plist>"
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
exports[`Expo Config Plugin Tests Should modify Info.plist 3`] = `
|
|
323
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
324
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
325
|
+
<plist version="1.0">
|
|
326
|
+
<dict>
|
|
327
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
328
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
329
|
+
<key>CFBundleDisplayName</key>
|
|
330
|
+
<string>example</string>
|
|
331
|
+
<key>CFBundleExecutable</key>
|
|
332
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
333
|
+
<key>CFBundleIdentifier</key>
|
|
334
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
335
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
336
|
+
<string>6.0</string>
|
|
337
|
+
<key>CFBundleName</key>
|
|
338
|
+
<string>$(PRODUCT_NAME)</string>
|
|
339
|
+
<key>CFBundlePackageType</key>
|
|
340
|
+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
341
|
+
<key>CFBundleShortVersionString</key>
|
|
342
|
+
<string>1.0.0</string>
|
|
343
|
+
<key>CFBundleSignature</key>
|
|
344
|
+
<string>????</string>
|
|
345
|
+
<key>CFBundleURLTypes</key>
|
|
346
|
+
<array>
|
|
347
|
+
<dict>
|
|
348
|
+
<key>CFBundleURLSchemes</key>
|
|
349
|
+
<array>
|
|
350
|
+
<string>com.example</string>
|
|
351
|
+
</array>
|
|
352
|
+
</dict>
|
|
353
|
+
</array>
|
|
354
|
+
<key>CFBundleVersion</key>
|
|
355
|
+
<string>1</string>
|
|
356
|
+
<key>GADApplicationIdentifier</key>
|
|
357
|
+
<string>TestIosId</string>
|
|
358
|
+
<key>GADDelayAppMeasurementInit</key>
|
|
359
|
+
<true/>
|
|
360
|
+
<key>LSRequiresIPhoneOS</key>
|
|
361
|
+
<true/>
|
|
362
|
+
<key>NSAppTransportSecurity</key>
|
|
363
|
+
<dict>
|
|
364
|
+
<key>NSAllowsArbitraryLoads</key>
|
|
365
|
+
<true/>
|
|
366
|
+
<key>NSExceptionDomains</key>
|
|
367
|
+
<dict>
|
|
368
|
+
<key>localhost</key>
|
|
369
|
+
<dict>
|
|
370
|
+
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
371
|
+
<true/>
|
|
372
|
+
</dict>
|
|
373
|
+
</dict>
|
|
374
|
+
</dict>
|
|
375
|
+
<key>NSUserTrackingUsageDescription</key>
|
|
376
|
+
<string>TestUserTrackingUsageDescription</string>
|
|
377
|
+
<key>SKAdNetworkItems</key>
|
|
378
|
+
<array>
|
|
379
|
+
<dict>
|
|
380
|
+
<key>SKAdNetworkIdentifier</key>
|
|
381
|
+
<string>TestSkAdNetworkItem1</string>
|
|
382
|
+
</dict>
|
|
383
|
+
<dict>
|
|
384
|
+
<key>SKAdNetworkIdentifier</key>
|
|
385
|
+
<string>TestSkAdNetworkItem2</string>
|
|
386
|
+
</dict>
|
|
387
|
+
</array>
|
|
388
|
+
<key>UILaunchStoryboardName</key>
|
|
389
|
+
<string>SplashScreen</string>
|
|
390
|
+
<key>UIRequiredDeviceCapabilities</key>
|
|
391
|
+
<array>
|
|
392
|
+
<string>armv7</string>
|
|
393
|
+
</array>
|
|
394
|
+
<key>UIRequiresFullScreen</key>
|
|
395
|
+
<false/>
|
|
396
|
+
<key>UIStatusBarStyle</key>
|
|
397
|
+
<string>UIStatusBarStyleDefault</string>
|
|
398
|
+
<key>UISupportedInterfaceOrientations</key>
|
|
399
|
+
<array>
|
|
400
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
401
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
402
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
403
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
404
|
+
</array>
|
|
405
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
406
|
+
<array>
|
|
407
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
408
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
409
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
410
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
411
|
+
</array>
|
|
412
|
+
<key>UIUserInterfaceStyle</key>
|
|
413
|
+
<string>Light</string>
|
|
414
|
+
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
415
|
+
<false/>
|
|
416
|
+
</dict>
|
|
417
|
+
</plist>"
|
|
418
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: 'example',
|
|
3
|
+
slug: 'example',
|
|
4
|
+
android: {
|
|
5
|
+
package: 'com.example',
|
|
6
|
+
},
|
|
7
|
+
ios: {
|
|
8
|
+
bundleIdentifier: 'com.example',
|
|
9
|
+
},
|
|
10
|
+
plugins: [
|
|
11
|
+
[
|
|
12
|
+
'../../build',
|
|
13
|
+
{
|
|
14
|
+
androidAppId: 'TestAppId',
|
|
15
|
+
iosAppId: 'TestIosId',
|
|
16
|
+
delayAppMeasurementInit: true,
|
|
17
|
+
optimizeInitialization: true,
|
|
18
|
+
optimizeAdLoading: true,
|
|
19
|
+
skAdNetworkItems: ['TestSkAdNetworkItem1', 'TestSkAdNetworkItem2'],
|
|
20
|
+
userTrackingUsageDescription: 'TestUserTrackingUsageDescription',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
],
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'example',
|
|
3
|
+
slug: 'example',
|
|
4
|
+
android: {
|
|
5
|
+
package: 'com.example',
|
|
6
|
+
},
|
|
7
|
+
ios: {
|
|
8
|
+
bundleIdentifier: 'com.example',
|
|
9
|
+
},
|
|
10
|
+
plugins: [
|
|
11
|
+
[
|
|
12
|
+
'../../build',
|
|
13
|
+
{
|
|
14
|
+
androidAppId: 'TestAppId',
|
|
15
|
+
iosAppId: 'TestIosId',
|
|
16
|
+
delayAppMeasurementInit: true,
|
|
17
|
+
optimizeInitialization: true,
|
|
18
|
+
optimizeAdLoading: true,
|
|
19
|
+
skAdNetworkItems: ['TestSkAdNetworkItem1', 'TestSkAdNetworkItem2'],
|
|
20
|
+
userTrackingUsageDescription: 'TestUserTrackingUsageDescription',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
],
|
|
24
|
+
};
|
|
@@ -5,7 +5,7 @@ import util from 'util';
|
|
|
5
5
|
|
|
6
6
|
const execAsync = util.promisify(exec);
|
|
7
7
|
|
|
8
|
-
describe('Expo Config Plugin Tests',
|
|
8
|
+
describe.each(['app.json', 'app.config.js', 'app.config.ts'])('Expo Config Plugin Tests', expoConfigFileName => {
|
|
9
9
|
const fixturesPath = path.join(__dirname, 'fixtures');
|
|
10
10
|
const testAppPath = path.join(__dirname, 'build');
|
|
11
11
|
const infoPlistPath = path.join(testAppPath, 'ios', 'example', 'Info.plist');
|
|
@@ -21,7 +21,10 @@ describe('Expo Config Plugin Tests', () => {
|
|
|
21
21
|
beforeEach(async () => {
|
|
22
22
|
await fs.rm(testAppPath, { recursive: true, force: true });
|
|
23
23
|
await fs.mkdir(testAppPath);
|
|
24
|
-
await fs.copyFile(
|
|
24
|
+
await fs.copyFile(
|
|
25
|
+
path.join(fixturesPath, expoConfigFileName),
|
|
26
|
+
path.join(testAppPath, expoConfigFileName),
|
|
27
|
+
);
|
|
25
28
|
await fs.copyFile(
|
|
26
29
|
path.join(fixturesPath, 'package.json'),
|
|
27
30
|
path.join(testAppPath, 'package.json'),
|
|
@@ -34,8 +37,8 @@ describe('Expo Config Plugin Tests', () => {
|
|
|
34
37
|
|
|
35
38
|
it('Warns about missing androidAppId', async () => {
|
|
36
39
|
await fs.copyFile(
|
|
37
|
-
path.join(fixturesPath,
|
|
38
|
-
path.join(testAppPath,
|
|
40
|
+
path.join(fixturesPath, "without-params", expoConfigFileName),
|
|
41
|
+
path.join(testAppPath, expoConfigFileName),
|
|
39
42
|
);
|
|
40
43
|
|
|
41
44
|
const { stderr } = await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
|
|
@@ -44,8 +47,8 @@ describe('Expo Config Plugin Tests', () => {
|
|
|
44
47
|
|
|
45
48
|
it('Warns about missing iosAppId', async () => {
|
|
46
49
|
await fs.copyFile(
|
|
47
|
-
path.join(fixturesPath,
|
|
48
|
-
path.join(testAppPath,
|
|
50
|
+
path.join(fixturesPath, "without-params", expoConfigFileName),
|
|
51
|
+
path.join(testAppPath, expoConfigFileName),
|
|
49
52
|
);
|
|
50
53
|
|
|
51
54
|
const { stderr } = await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
|
|
@@ -54,8 +57,8 @@ describe('Expo Config Plugin Tests', () => {
|
|
|
54
57
|
|
|
55
58
|
it('Optimizes initialization on Android by default', async () => {
|
|
56
59
|
await fs.copyFile(
|
|
57
|
-
path.join(fixturesPath,
|
|
58
|
-
path.join(testAppPath,
|
|
60
|
+
path.join(fixturesPath, "without-params", expoConfigFileName),
|
|
61
|
+
path.join(testAppPath, expoConfigFileName),
|
|
59
62
|
);
|
|
60
63
|
|
|
61
64
|
await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
|
|
@@ -68,8 +71,8 @@ describe('Expo Config Plugin Tests', () => {
|
|
|
68
71
|
|
|
69
72
|
it('Optimizes ad loading on Android by default', async () => {
|
|
70
73
|
await fs.copyFile(
|
|
71
|
-
path.join(fixturesPath,
|
|
72
|
-
path.join(testAppPath,
|
|
74
|
+
path.join(fixturesPath, "without-params", expoConfigFileName),
|
|
75
|
+
path.join(testAppPath, expoConfigFileName),
|
|
73
76
|
);
|
|
74
77
|
|
|
75
78
|
await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
isUndefined,
|
|
25
25
|
isValidUrl,
|
|
26
26
|
} from './common';
|
|
27
|
+
import { version } from './version';
|
|
27
28
|
import { RequestOptions } from './types/RequestOptions';
|
|
28
29
|
|
|
29
30
|
export function validateAdRequestOptions(options?: RequestOptions) {
|
|
@@ -97,6 +98,8 @@ export function validateAdRequestOptions(options?: RequestOptions) {
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
out.requestAgent = options.requestAgent;
|
|
101
|
+
} else {
|
|
102
|
+
out.requestAgent = `rn-invertase-${version}`;
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
if (options.serverSideVerificationOptions) {
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '14.2.
|
|
2
|
+
export const version = '14.2.3';
|
|
File without changes
|