From 02db827f8df24023b3029b6b523255d76837b4d2 Mon Sep 17 00:00:00 2001 From: Andreas Kirsch Date: Tue, 2 Jan 2024 19:53:53 +0100 Subject: [PATCH 01/13] feat(config, ios): add support for app.config.js --- ios_config.sh | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/ios_config.sh b/ios_config.sh index ada7900f..a532c776 100755 --- a/ios_config.sh +++ b/ios_config.sh @@ -16,6 +16,13 @@ # set -e +if [[ -f "$PODS_ROOT/../.xcode.env" ]]; then + source "$PODS_ROOT/../.xcode.env" +fi +if [[ -f "$PODS_ROOT/../.xcode.env.local" ]]; then + source "$PODS_ROOT/../.xcode.env.local" +fi + _MAX_LOOKUPS=2; _SEARCH_RESULT='' _RN_ROOT_EXISTS='' @@ -23,11 +30,13 @@ _CURRENT_LOOKUPS=1 _PROJECT_ABBREVIATION="RNGoogleMobileAds" _JSON_ROOT="'react-native-google-mobile-ads'" _JSON_FILE_NAME='app.json' +_JS_APP_CONFIG_FILE_NAME='app.config.js' _JSON_OUTPUT_BASE64='e30=' # { } _CURRENT_SEARCH_DIR=${PROJECT_DIR} _PLIST_BUDDY=/usr/libexec/PlistBuddy _TARGET_PLIST="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}" _DSYM_PLIST="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist" +_IS_CONFIG_JS=false # plist arrays _PLIST_ENTRY_KEYS=() @@ -65,18 +74,36 @@ fi; while true; do _CURRENT_SEARCH_DIR=$(dirname "$_CURRENT_SEARCH_DIR") - if [[ "$_CURRENT_SEARCH_DIR" == "/" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi; - echo "info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file." - _SEARCH_RESULT=$(find "$_CURRENT_SEARCH_DIR" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1) - if [[ ${_SEARCH_RESULT} ]]; then - echo "info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT" + + if [[ "$_CURRENT_SEARCH_DIR" == "/" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then + break; + fi; + + echo "info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME}/${_JS_APP_CONFIG_FILE_NAME} file." + + _SEARCH_RESULT=$(find "$_CURRENT_SEARCH_DIR" -maxdepth 2 \( -name ${_JSON_FILE_NAME} -o -name ${_JS_APP_CONFIG_FILE_NAME} \) -print | /usr/bin/head -n 1) + + if [[ "$(basename ${_SEARCH_RESULT})" = "${_JS_APP_CONFIG_FILE_NAME}" ]]; then + _IS_CONFIG_JS=true + echo "info: ${_JS_APP_CONFIG_FILE_NAME} found at $_SEARCH_RESULT" break; fi; + + if [[ "$(basename ${_SEARCH_RESULT})" = "${_JSON_FILE_NAME}" ]]; then + echo "info: ${_JSON_FILE_NAME} found at ${_SEARCH_RESULT}" + break; + fi; + _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1)) done if [[ ${_SEARCH_RESULT} ]]; then - _JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}") + if [[ ${_IS_CONFIG_JS} == "true" ]]; then + _JSON_OUTPUT_RAW=$("${NODE_BINARY}" -e "console.log(JSON.stringify(require('${_SEARCH_RESULT}')));") + else + _JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}") + fi; + _RN_ROOT_EXISTS=$(ruby -KU -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '') if [[ ${_RN_ROOT_EXISTS} ]]; then @@ -176,3 +203,4 @@ for plist in "${_TARGET_PLIST}" "${_DSYM_PLIST}" ; do done echo "info: <- ${_PROJECT_ABBREVIATION} build script finished" + From baf26e46db229ba33c33fbdb1777a0eed4d511c1 Mon Sep 17 00:00:00 2001 From: Andreas Kirsch Date: Tue, 2 Jan 2024 20:51:38 +0100 Subject: [PATCH 02/13] feat(config, android): add support for app.config.js --- android/app-json.gradle | 40 ++++++++++++++++++++++++++++++++-------- android/build.gradle | 2 +- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/android/app-json.gradle b/android/app-json.gradle index 3a687fd4..875bd142 100644 --- a/android/app-json.gradle +++ b/android/app-json.gradle @@ -1,30 +1,54 @@ import groovy.json.JsonOutput import groovy.json.JsonSlurper -String fileName = "app.json" +String[] fileNames = ["app.json", "app.config.js"] +String fileName = null String jsonRoot = "react-native-google-mobile-ads" String jsonRaw = "GOOGLE_MOBILE_ADS_JSON_RAW" -File jsonFile = null +File configFile = null File parentDir = rootProject.projectDir for (int i = 0; i <= 3; i++) { if (parentDir == null) break parentDir = parentDir.parentFile if (parentDir != null) { - jsonFile = new File(parentDir, fileName) - if (jsonFile.exists()) break + configFile = new File(parentDir, fileNames[0]) + if (configFile.exists()) { + fileName = fileNames[0] + break + } + else { + configFile = new File(parentDir, fileNames[1]) + if (configFile.exists()) { + fileName = fileNames[0] + break + } + } } } -if (jsonFile != null && jsonFile.exists()) { - rootProject.logger.info ":${project.name} ${fileName} found at ${jsonFile.toString()}" +if (configFile != null && configFile.exists()) { + rootProject.logger.info ":${project.name} ${fileName} found at ${configFile.toString()}" Object json = null try { - json = new JsonSlurper().parseText(jsonFile.text) + def configOutput = [ + "node", + "-e", + "console.log(JSON.stringify(require('${configFile.absolutePath}')));" + ] + .execute(null, projectDir) + .text + .trim() + + if (configOutput && !configOutput.isEmpty()) { + json = new JsonSlurper().parseText(configOutput.toString()) + } else { + rootProject.logger.warn ":${project.name} received empty output while parsing ${configFile} found at ${configFile.toString()}." + } } catch (Exception ignored) { - rootProject.logger.warn ":${project.name} failed to parse ${fileName} found at ${jsonFile.toString()}." + rootProject.logger.warn ":${project.name} failed to parse ${configFile} found at ${configFile.toString()}." rootProject.logger.warn ignored.toString() } diff --git a/android/build.gradle b/android/build.gradle index ac63a2ff..769f8213 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -90,7 +90,7 @@ if (!appJSONGoogleMobileAdsAppIDString) { println "\n\n\n" println "**************************************************************************************************************" println "\n\n\n" - println "ERROR: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json." + println "ERROR: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json/app.config.js." println " No android_app_id property was found in this location. The native Google Mobile Ads SDK will crash on startup without it." println "\n\n\n" println "**************************************************************************************************************" From 2284a446de38de218469abfd11dba072f97c1de4 Mon Sep 17 00:00:00 2001 From: Andreas Kirsch Date: Tue, 2 Jan 2024 21:08:23 +0100 Subject: [PATCH 03/13] docs(installation): enhance docs for app.config.js support --- docs/index.mdx | 141 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 5 deletions(-) diff --git a/docs/index.mdx b/docs/index.mdx index c847904e..712383e8 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -12,7 +12,9 @@ yarn add react-native-google-mobile-ads On iOS if you need to use static frameworks (that is, `use_frameworks! :linkage => :static` in your `Podfile`) you must add the variable `$RNGoogleMobileAdsAsStaticFramework = true` to the targets in your `Podfile`. You may need this if you use this module in combination with react-native-firebase v15 and higher since it requires `use_frameworks!`. 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` file: + +#### app.json ```json { @@ -31,6 +33,25 @@ To do so [follow the official `expo-build-properties` installation instructions] } ``` +#### app.config.js + +```js +{ + expo: { + plugins: [ + [ + 'expo-build-properties', + { + ios: { + useFrameworks: 'static', + }, + }, + ], + ]; + } +} +``` + ## What does it do The AdMob module allows you to display adverts to your users. All adverts are served over the Google AdMob network, meaning @@ -63,15 +84,17 @@ Before you are able to display ads to your users, you must have a [Google AdMob "Apps" menu item, create or choose an existing Android/iOS app. Each app platform exposes a unique account ID which needs to be added to the project. -> 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 a valid App ID in `app.json`/`app.config.js` will cause the app to crash on start or fail to build. 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) -Within the root of your React Native project, open the `app.json` file and add the +Within the root of your React Native project, open the `app.json`/`app.config.js` file and add the `android_app_id` & `ios_app_id` keys with the IDs from the Google AdMob console: +#### app.json + ```json // /app.json { @@ -82,9 +105,23 @@ Within the root of your React Native project, open the `app.json` file and add t } ``` +#### app.config.js + +```js +// /app.config.js +module.exports = { + 'react-native-google-mobile-ads': { + android_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', + ios_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', + }, +}; +``` + If you're an expo user, make sure the `react-native-google-mobile-ads` block is outside of the `expo` block! It should look like this: +#### app.json + ```json // /app.json { @@ -98,6 +135,21 @@ It should look like this: } ``` +#### app.config.js + +```js +// /app.config.js +module.exports = { + expo: { + // ... + }, + 'react-native-google-mobile-ads': { + android_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', + ios_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', + }, +}; +``` + For the changes to take effect, rebuild your project: ```bash @@ -188,7 +240,9 @@ 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): +Within your projects `app.json`/`app.config.js` file, add the advised [SKAdNetwork identifiers](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/3p-skadnetworks): + +#### app.json ```json { @@ -250,10 +304,74 @@ Within your projects `app.json` file, add the advised [SKAdNetwork identifiers]( } ``` +#### app.config.js + +```js +module.exports = { + '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', + '4pfyvq9l8r.skadnetwork', + '2fnua5tdw4.skadnetwork', + 'ydx93a7ass.skadnetwork', + '5a6flpkh64.skadnetwork', + 'p78axxw29g.skadnetwork', + 'v72qych5uu.skadnetwork', + 'ludvb6z3bs.skadnetwork', + 'cp8zw746q7.skadnetwork', + '3sh42y64q3.skadnetwork', + 'c6k4g5qg8m.skadnetwork', + 's39g8k73mm.skadnetwork', + '3qy4746246.skadnetwork', + 'f38h382jlk.skadnetwork', + 'hs6bdukanm.skadnetwork', + 'v4nxqhlyqp.skadnetwork', + 'wzmmz9fp6w.skadnetwork', + 'yclnxrl5pm.skadnetwork', + 't38b2kh725.skadnetwork', + '7ug5zh24hu.skadnetwork', + 'gta9lk7p23.skadnetwork', + 'vutu7akeur.skadnetwork', + 'y5ghdn5j9k.skadnetwork', + 'n6fk4nfna4.skadnetwork', + 'v9wttpbfk9.skadnetwork', + 'n38lu8286q.skadnetwork', + '47vhws6wlr.skadnetwork', + 'kbd757ywx3.skadnetwork', + '9t245vhmpl.skadnetwork', + 'eh6m2bh4zr.skadnetwork', + 'a2p9lx4jpn.skadnetwork', + '22mmun2rn5.skadnetwork', + '4468km3ulz.skadnetwork', + '2u9pt9hc89.skadnetwork', + '8s468mfl3y.skadnetwork', + 'klf5c3l5u5.skadnetwork', + 'ppxm28t8ap.skadnetwork', + 'ecpz2srf59.skadnetwork', + 'uw77j35x4d.skadnetwork', + 'pwa73g5rt2.skadnetwork', + 'mlmmfzh3r3.skadnetwork', + '578prtvx9j.skadnetwork', + '4dzt52r2t5.skadnetwork', + 'e5fvkxwrpn.skadnetwork', + '8c4e2ghe7u.skadnetwork', + 'zq492l623r.skadnetwork', + '3rd42ekr43.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 projects `app.json` file, you have to use the `user_tracking_usage_description` to describe your usage: +Within your projects `app.json`/`app.config.js` file, you have to use the `user_tracking_usage_description` to describe your usage: + +#### app.json ```json { @@ -265,6 +383,19 @@ Within your projects `app.json` file, you have to use the `user_tracking_usage_d } ``` +#### app.config.js + +```js +module.exports = { + '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.', + }, +}; +``` + To request the App Tracking Transparency authorization we recommend using the [react-native-permissions](https://github.com/zoontek/react-native-permissions) library or making it part of the UMP consent flow [European User Consent page](/european-user-consent). ```js From babe286efabd10d085025c45ab2f04db687bd896 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:07 -0500 Subject: [PATCH 04/13] Update android/app-json.gradle --- android/app-json.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/app-json.gradle b/android/app-json.gradle index 875bd142..c18c2fc3 100644 --- a/android/app-json.gradle +++ b/android/app-json.gradle @@ -33,6 +33,10 @@ if (configFile != null && configFile.exists()) { Object json = null try { + // The config may be either in Expo javascript (app.config.js) or JSON (app.json) + // If it is configured in Expo javascript, requiring it will generate a config + // If it is configured in JSON, requiring it will also generate the config + // So, use node to pull in the config file to get us a JSON string for either case def configOutput = [ "node", "-e", From 436125e8b96299fd9818b5a36d7ac2c3c88223fe Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:14 -0500 Subject: [PATCH 05/13] Update docs/index.mdx --- docs/index.mdx | 52 +++----------------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/docs/index.mdx b/docs/index.mdx index 712383e8..fe4231b3 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -312,55 +312,9 @@ module.exports = { android_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', ios_app_id: 'ca-app-pub-xxxxxxxx~xxxxxxxx', sk_ad_network_items: [ - 'cstr6suwn9.skadnetwork', - '4fzdc2evr5.skadnetwork', - '4pfyvq9l8r.skadnetwork', - '2fnua5tdw4.skadnetwork', - 'ydx93a7ass.skadnetwork', - '5a6flpkh64.skadnetwork', - 'p78axxw29g.skadnetwork', - 'v72qych5uu.skadnetwork', - 'ludvb6z3bs.skadnetwork', - 'cp8zw746q7.skadnetwork', - '3sh42y64q3.skadnetwork', - 'c6k4g5qg8m.skadnetwork', - 's39g8k73mm.skadnetwork', - '3qy4746246.skadnetwork', - 'f38h382jlk.skadnetwork', - 'hs6bdukanm.skadnetwork', - 'v4nxqhlyqp.skadnetwork', - 'wzmmz9fp6w.skadnetwork', - 'yclnxrl5pm.skadnetwork', - 't38b2kh725.skadnetwork', - '7ug5zh24hu.skadnetwork', - 'gta9lk7p23.skadnetwork', - 'vutu7akeur.skadnetwork', - 'y5ghdn5j9k.skadnetwork', - 'n6fk4nfna4.skadnetwork', - 'v9wttpbfk9.skadnetwork', - 'n38lu8286q.skadnetwork', - '47vhws6wlr.skadnetwork', - 'kbd757ywx3.skadnetwork', - '9t245vhmpl.skadnetwork', - 'eh6m2bh4zr.skadnetwork', - 'a2p9lx4jpn.skadnetwork', - '22mmun2rn5.skadnetwork', - '4468km3ulz.skadnetwork', - '2u9pt9hc89.skadnetwork', - '8s468mfl3y.skadnetwork', - 'klf5c3l5u5.skadnetwork', - 'ppxm28t8ap.skadnetwork', - 'ecpz2srf59.skadnetwork', - 'uw77j35x4d.skadnetwork', - 'pwa73g5rt2.skadnetwork', - 'mlmmfzh3r3.skadnetwork', - '578prtvx9j.skadnetwork', - '4dzt52r2t5.skadnetwork', - 'e5fvkxwrpn.skadnetwork', - '8c4e2ghe7u.skadnetwork', - 'zq492l623r.skadnetwork', - '3rd42ekr43.skadnetwork', - '3qcr597p9d.skadnetwork', + // list of network ids removed to avoid duplication + // please refer to the list in the `app.jaon` configuration section for the list of + // network ids you should include here and paste them into your `app.config.js` file ], }, }; From fdaa8772a8fc3ba61f033a523087f35cf85bf326 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:20 -0500 Subject: [PATCH 06/13] Update docs/index.mdx --- docs/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.mdx b/docs/index.mdx index fe4231b3..ec71e5d3 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -84,7 +84,7 @@ Before you are able to display ads to your users, you must have a [Google AdMob "Apps" menu item, create or choose an existing Android/iOS app. Each app platform exposes a unique account ID which needs to be added to the project. -> Attempting to build your app without a valid App ID in `app.json`/`app.config.js` will cause the app to crash on start or fail to build. +> Attempting to build your app without a valid App ID in `app.json` or `app.config.js` will cause the app to crash on start or fail to build. Under the "App settings" menu item, you can find the "App ID": From 24d037c2260108ec4fb42e91f07741e434576e6b Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:27 -0500 Subject: [PATCH 07/13] Update android/build.gradle --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 769f8213..16ec7a35 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -90,7 +90,7 @@ if (!appJSONGoogleMobileAdsAppIDString) { println "\n\n\n" println "**************************************************************************************************************" println "\n\n\n" - println "ERROR: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json/app.config.js." + println "ERROR: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json or app.config.js." println " No android_app_id property was found in this location. The native Google Mobile Ads SDK will crash on startup without it." println "\n\n\n" println "**************************************************************************************************************" From 6e625983f6029c4b84b31fc2ce9424002f2a05e9 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:32 -0500 Subject: [PATCH 08/13] Update docs/index.mdx --- docs/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.mdx b/docs/index.mdx index ec71e5d3..ac471366 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -12,7 +12,7 @@ yarn add react-native-google-mobile-ads On iOS if you need to use static frameworks (that is, `use_frameworks! :linkage => :static` in your `Podfile`) you must add the variable `$RNGoogleMobileAdsAsStaticFramework = true` to the targets in your `Podfile`. You may need this if you use this module in combination with react-native-firebase v15 and higher since it requires `use_frameworks!`. 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`/`app.config.js` 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` or `app.config.js` file: #### app.json From 4e72416c1edd490eea21c4f38e2ffc77f704e6fc Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:39 -0500 Subject: [PATCH 09/13] Update docs/index.mdx --- docs/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.mdx b/docs/index.mdx index ac471366..03a66ec1 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -90,7 +90,7 @@ 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) -Within the root of your React Native project, open the `app.json`/`app.config.js` file and add the +Within the root of your React Native project, open the `app.json` or (if using Expo) `app.config.js` file and add the `android_app_id` & `ios_app_id` keys with the IDs from the Google AdMob console: #### app.json From 602de82789258b15976c623a2ae5d8e6ad27a77a Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 07:56:45 -0500 Subject: [PATCH 10/13] Update docs/index.mdx --- docs/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.mdx b/docs/index.mdx index 03a66ec1..8ae8964f 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -323,7 +323,7 @@ module.exports = { ### 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`/`app.config.js` file, you have to use the `user_tracking_usage_description` to describe your usage: +Within your projects `app.json` or `app.config.js` file, you have to use the `user_tracking_usage_description` to describe your usage: #### app.json From 6186820eef00709d740c70bbbc005f27aeca1300 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 11:27:08 -0500 Subject: [PATCH 11/13] test: pin detox to 19 (20 does not do jest) - requires updated patch to handle AGP namespace requirements - requires updated patch to handle new apple sim error codes --- RNGoogleMobileAdsExample/ios/Podfile.lock | 40 ++-- .../project.pbxproj | 2 +- RNGoogleMobileAdsExample/package.json | 2 +- .../patches/detox+19.13.0.patch | 162 +++++++++++++ .../patches/detox+20.11.1.patch | 40 ---- RNGoogleMobileAdsExample/yarn.lock | 221 +++++------------- 6 files changed, 248 insertions(+), 219 deletions(-) create mode 100644 RNGoogleMobileAdsExample/patches/detox+19.13.0.patch delete mode 100644 RNGoogleMobileAdsExample/patches/detox+20.11.1.patch diff --git a/RNGoogleMobileAdsExample/ios/Podfile.lock b/RNGoogleMobileAdsExample/ios/Podfile.lock index 68af120c..48ddc7b6 100644 --- a/RNGoogleMobileAdsExample/ios/Podfile.lock +++ b/RNGoogleMobileAdsExample/ios/Podfile.lock @@ -70,46 +70,46 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - Google-Mobile-Ads-SDK (10.12.0): + - Google-Mobile-Ads-SDK (10.14.0): - GoogleAppMeasurement (< 11.0, >= 7.0) - GoogleUserMessagingPlatform (>= 1.1) - - GoogleAppMeasurement (10.17.0): - - GoogleAppMeasurement/AdIdSupport (= 10.17.0) + - GoogleAppMeasurement (10.19.0): + - GoogleAppMeasurement/AdIdSupport (= 10.19.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.17.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.17.0) + - GoogleAppMeasurement/AdIdSupport (10.19.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 10.19.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.17.0): + - GoogleAppMeasurement/WithoutAdIdSupport (10.19.0): - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - GoogleUserMessagingPlatform (2.1.0) - - GoogleUtilities/AppDelegateSwizzler (7.11.6): + - GoogleUtilities/AppDelegateSwizzler (7.12.0): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.6): + - GoogleUtilities/Environment (7.12.0): - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.11.6): + - GoogleUtilities/Logger (7.12.0): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.11.6): + - GoogleUtilities/MethodSwizzler (7.12.0): - GoogleUtilities/Logger - - GoogleUtilities/Network (7.11.6): + - GoogleUtilities/Network (7.12.0): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.6)" - - GoogleUtilities/Reachability (7.11.6): + - "GoogleUtilities/NSData+zlib (7.12.0)" + - GoogleUtilities/Reachability (7.12.0): - GoogleUtilities/Logger - hermes-engine (0.72.2): - hermes-engine/Pre-built (= 0.72.2) @@ -534,8 +534,8 @@ PODS: - React-jsi (= 0.72.2) - React-logger (= 0.72.2) - React-perflogger (= 0.72.2) - - RNGoogleMobileAds (12.3.0): - - Google-Mobile-Ads-SDK (= 10.12.0) + - RNGoogleMobileAds (12.7.1): + - Google-Mobile-Ads-SDK (= 10.14.0) - GoogleUserMessagingPlatform (= 2.1.0) - RCT-Folly (= 2021.07.22.00) - React-Core @@ -735,10 +735,10 @@ SPEC CHECKSUMS: FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Google-Mobile-Ads-SDK: 976fdf273815674eed30b8aafffedb3c25b055e4 - GoogleAppMeasurement: 4dcddfc7f102825c1c4e6422cb35567b101881a7 + Google-Mobile-Ads-SDK: 8f67a72f88d057335b1ac3f501e2b68ad054116e + GoogleAppMeasurement: 68afe759316673c6554dac35a0c7ae8f5d6cb4ed GoogleUserMessagingPlatform: dce302b8f1b84d6e945812ee7a15c3f65a102cbf - GoogleUtilities: 202e7a9f5128accd11160fb9c19612de1911aa19 + GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34 hermes-engine: 3f42310d66bcbc814b3771b79ad8d5a3f8df3df1 Jet: c17c29bfbbaff56f08a17678211f36b859173e99 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 @@ -777,11 +777,11 @@ SPEC CHECKSUMS: React-runtimescheduler: dbea23f2991dfa010654165de8159862935aed27 React-utils: ec05233cf7ee1d7014d41aaa17ec65ceeba8948d ReactCommon: 77382645a088a81de55c24bde19c5a2805d891c3 - RNGoogleMobileAds: e5aa3c615280588cc70ef1039bd1ce6ead131e6b + RNGoogleMobileAds: b696339ffa53c8efbee232c0dff8b0dd466964fc SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: c79810ea24a2a73b7f39174e78d60f4e28261f33 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: ad5b72079f3063adc720629375fc9194bb51ba43 -COCOAPODS: 1.14.2 +COCOAPODS: 1.14.3 diff --git a/RNGoogleMobileAdsExample/ios/RNGoogleMobileAdsExample.xcodeproj/project.pbxproj b/RNGoogleMobileAdsExample/ios/RNGoogleMobileAdsExample.xcodeproj/project.pbxproj index 223c388e..4f80bf33 100644 --- a/RNGoogleMobileAdsExample/ios/RNGoogleMobileAdsExample.xcodeproj/project.pbxproj +++ b/RNGoogleMobileAdsExample/ios/RNGoogleMobileAdsExample.xcodeproj/project.pbxproj @@ -295,7 +295,7 @@ name = "[CP-User] [RNGoogleMobileAds] Configuration"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_PROJECT_ABBREVIATION=\"RNGoogleMobileAds\"\n_JSON_ROOT=\"'react-native-google-mobile-ads'\"\n_JSON_FILE_NAME='app.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -KU -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> ${_PROJECT_ABBREVIATION} build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -KU -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, app.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"google_mobile_ads_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.delay_app_measurement_init\n _DELAY_APP_MEASUREMENT=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"delay_app_measurement_init\")\n if [[ $_DELAY_APP_MEASUREMENT == \"true\" ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADDelayAppMeasurementInit\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"YES\")\n fi\n\n # config.ios_app_id\n _IOS_APP_ID=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"ios_app_id\")\n if [[ $_IOS_APP_ID ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADApplicationIdentifier\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_IOS_APP_ID\")\n fi\n\n # config.sk_ad_network_items\n _SK_AD_NETWORK_ITEMS=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"sk_ad_network_items\")\n if [[ $_SK_AD_NETWORK_ITEMS ]]; then\n _PLIST_ENTRY_KEYS+=(\"SKAdNetworkItems\")\n _PLIST_ENTRY_TYPES+=(\"array\")\n _PLIST_ENTRY_VALUES+=(\"\")\n\n oldifs=$IFS\n IFS=\"\n\"\n array=($(echo \"$_SK_AD_NETWORK_ITEMS\"))\n IFS=$oldifs\n for i in \"${!array[@]}\"; do\n _PLIST_ENTRY_KEYS+=(\"SKAdNetworkItems:$i:SKAdNetworkIdentifier\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"${array[i]}\") \n done\n fi\n\n # config.user_tracking_usage_description\n _USER_TRACKING_USAGE_DESCRIPTION=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"user_tracking_usage_description\")\n if [[ $_USER_TRACKING_USAGE_DESCRIPTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"NSUserTrackingUsageDescription\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_USER_TRACKING_USAGE_DESCRIPTION\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"google_mobile_ads_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A ${_JSON_FILE_NAME} file was not found, whilst this file is optional it is recommended to include it to auto-configure services.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nif ! [[ -f \"${_TARGET_PLIST}\" ]]; then\n echo \"error: unable to locate Info.plist to set properties. App will crash without GADApplicationIdentifier set.\"\n exit 1\nfi\n\nif ! [[ $_IOS_APP_ID ]]; then\n echo \"error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.\"\n exit 1\nfi\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- ${_PROJECT_ABBREVIATION} build script finished\"\n"; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_PROJECT_ABBREVIATION=\"RNGoogleMobileAds\"\n_JSON_ROOT=\"'react-native-google-mobile-ads'\"\n_JSON_FILE_NAME='app.json'\n_JS_APP_CONFIG_FILE_NAME='app.config.js'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n_IS_CONFIG_JS=false\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -KU -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> ${_PROJECT_ABBREVIATION} build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then\n break;\n fi;\n\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME}/${_JS_APP_CONFIG_FILE_NAME} file.\"\n\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 \\( -name ${_JSON_FILE_NAME} -o -name ${_JS_APP_CONFIG_FILE_NAME} \\) -print | /usr/bin/head -n 1)\n\n if [[ \"$(basename ${_SEARCH_RESULT})\" = \"${_JS_APP_CONFIG_FILE_NAME}\" ]]; then\n _IS_CONFIG_JS=true\n echo \"info: ${_JS_APP_CONFIG_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n\n if [[ \"$(basename ${_SEARCH_RESULT})\" = \"${_JSON_FILE_NAME}\" ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at ${_SEARCH_RESULT}\"\n break;\n fi;\n\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n if [[ ${_IS_CONFIG_JS} == \"true\" ]]; then\n _JSON_OUTPUT_RAW=$(\"${NODE_BINARY}\" -e \"console.log(JSON.stringify(require('${_SEARCH_RESULT}')));\")\n else\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n fi;\n\n _RN_ROOT_EXISTS=$(ruby -KU -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, app.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"google_mobile_ads_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.delay_app_measurement_init\n _DELAY_APP_MEASUREMENT=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"delay_app_measurement_init\")\n if [[ $_DELAY_APP_MEASUREMENT == \"true\" ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADDelayAppMeasurementInit\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"YES\")\n fi\n\n # config.ios_app_id\n _IOS_APP_ID=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"ios_app_id\")\n if [[ $_IOS_APP_ID ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADApplicationIdentifier\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_IOS_APP_ID\")\n fi\n\n # config.sk_ad_network_items\n _SK_AD_NETWORK_ITEMS=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"sk_ad_network_items\")\n if [[ $_SK_AD_NETWORK_ITEMS ]]; then\n _PLIST_ENTRY_KEYS+=(\"SKAdNetworkItems\")\n _PLIST_ENTRY_TYPES+=(\"array\")\n _PLIST_ENTRY_VALUES+=(\"\")\n\n oldifs=$IFS\n IFS=\"\n\"\n array=($(echo \"$_SK_AD_NETWORK_ITEMS\"))\n IFS=$oldifs\n for i in \"${!array[@]}\"; do\n _PLIST_ENTRY_KEYS+=(\"SKAdNetworkItems:$i:SKAdNetworkIdentifier\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"${array[i]}\") \n done\n fi\n\n # config.user_tracking_usage_description\n _USER_TRACKING_USAGE_DESCRIPTION=$(getJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"user_tracking_usage_description\")\n if [[ $_USER_TRACKING_USAGE_DESCRIPTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"NSUserTrackingUsageDescription\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_USER_TRACKING_USAGE_DESCRIPTION\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"google_mobile_ads_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A ${_JSON_FILE_NAME} file was not found, whilst this file is optional it is recommended to include it to auto-configure services.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nif ! [[ -f \"${_TARGET_PLIST}\" ]]; then\n echo \"error: unable to locate Info.plist to set properties. App will crash without GADApplicationIdentifier set.\"\n exit 1\nfi\n\nif ! [[ $_IOS_APP_ID ]]; then\n echo \"error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.\"\n exit 1\nfi\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- ${_PROJECT_ABBREVIATION} build script finished\"\n\n"; }; A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/RNGoogleMobileAdsExample/package.json b/RNGoogleMobileAdsExample/package.json index b3cf624e..6a5c59e5 100644 --- a/RNGoogleMobileAdsExample/package.json +++ b/RNGoogleMobileAdsExample/package.json @@ -25,7 +25,7 @@ "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", - "detox": "^20.6.0", + "detox": "^19", "eslint": "^8.19.0", "jest": "^29.2.1", "jest-circus": "^29.5.0", diff --git a/RNGoogleMobileAdsExample/patches/detox+19.13.0.patch b/RNGoogleMobileAdsExample/patches/detox+19.13.0.patch new file mode 100644 index 00000000..c163a612 --- /dev/null +++ b/RNGoogleMobileAdsExample/patches/detox+19.13.0.patch @@ -0,0 +1,162 @@ +diff --git a/node_modules/detox/android/detox/build.gradle b/node_modules/detox/android/detox/build.gradle +index 9185a26..9582988 100644 +--- a/node_modules/detox/android/detox/build.gradle ++++ b/node_modules/detox/android/detox/build.gradle +@@ -13,6 +13,7 @@ def _kotlinVersion = _ext.has('detoxKotlinVersion') ? _ext.detoxKotlinVersion : + def _kotlinStdlib = _ext.has('detoxKotlinStdlib') ? _ext.detoxKotlinStdlib : 'kotlin-stdlib-jdk8' + + android { ++ namespace 'com.wix.detox' + compileSdkVersion _compileSdkVersion + buildToolsVersion _buildToolsVersion + +diff --git a/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt b/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt +index af77cda..253cfb8 100644 +--- a/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt ++++ b/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt +@@ -4,12 +4,10 @@ import android.view.View + import androidx.appcompat.widget.AppCompatSeekBar + import com.facebook.react.bridge.JavaOnlyMap + import com.facebook.react.uimanager.ReactStylesDiffMap +-import com.facebook.react.views.slider.ReactSlider + import com.wix.detox.common.DetoxErrors.DetoxIllegalStateException + import com.wix.detox.espresso.action.common.ReflectUtils + import org.joor.Reflect + +-private const val CLASS_REACT_SLIDER_LEGACY = "com.facebook.react.views.slider.ReactSlider" + private const val CLASS_REACT_SLIDER_COMMUNITY = "com.reactnativecommunity.slider.ReactSlider" + + abstract class SliderHelper(protected val slider: AppCompatSeekBar) { +@@ -48,8 +46,6 @@ abstract class SliderHelper(protected val slider: AppCompatSeekBar) { + + fun maybeCreate(view: View): SliderHelper? = + when { +- ReflectUtils.isAssignableFrom(view, CLASS_REACT_SLIDER_LEGACY) +- -> LegacySliderHelper(view as ReactSlider) + ReflectUtils.isAssignableFrom(view, CLASS_REACT_SLIDER_COMMUNITY) + -> CommunitySliderHelper(view as AppCompatSeekBar) + else +@@ -58,15 +54,6 @@ abstract class SliderHelper(protected val slider: AppCompatSeekBar) { + } + } + +-private class LegacySliderHelper(slider: AppCompatSeekBar): SliderHelper(slider) { +- override fun setProgressJS(valueJS: Double) { +- val reactSliderManager = com.facebook.react.views.slider.ReactSliderManager() +- reactSliderManager.updateProperties(slider as ReactSlider, buildStyles("value", valueJS)) +- } +- +- private fun buildStyles(vararg keysAndValues: Any) = ReactStylesDiffMap(JavaOnlyMap.of(*keysAndValues)) +-} +- + private class CommunitySliderHelper(slider: AppCompatSeekBar): SliderHelper(slider) { + override fun setProgressJS(valueJS: Double) { + val reactSliderManager = Class.forName("com.reactnativecommunity.slider.ReactSliderManager").newInstance() +diff --git a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResource.kt b/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResource.kt +index ad3229f..c5e56e5 100644 +--- a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResource.kt ++++ b/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResource.kt +@@ -25,13 +25,14 @@ class TimersIdlingResource @JvmOverloads constructor( + } + + override fun checkIdle(): Boolean { +- return interrogationStrategy.isIdleNow().also { result -> +- if (result) { +- notifyIdle() +- } else { +- getChoreographer().postFrameCallback(this@TimersIdlingResource) +- } +- } ++ return true ++ // return interrogationStrategy.isIdleNow().also { result -> ++ // if (result) { ++ // notifyIdle() ++ // } else { ++ // getChoreographer().postFrameCallback(this@TimersIdlingResource) ++ // } ++ // } + } + + override fun doFrame(frameTimeNanos: Long) { +diff --git a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIModuleIdlingResource.kt b/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIModuleIdlingResource.kt +index fb4b820..d2dc87d 100644 +--- a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIModuleIdlingResource.kt ++++ b/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIModuleIdlingResource.kt +@@ -28,36 +28,39 @@ class UIModuleIdlingResource(private val reactContext: ReactContext) + .build() + + override fun checkIdle(): Boolean { +- try { +- if (!reactContext.hasActiveCatalystInstance()) { +- Log.e(LOG_TAG, "No active CatalystInstance. Should never see this.") +- return false +- } ++ // try { ++ // if (!reactContext.hasActiveCatalystInstance()) { ++ // Log.e(LOG_TAG, "No active CatalystInstance. Should never see this.") ++ // return false ++ // } + +- if (RNHelpers.getNativeModule(reactContext, "com.facebook.react.uimanager.UIManagerModule") == null) { +- notifyIdle() +- return true +- } ++ // if (RNHelpers.getNativeModule(reactContext, "com.facebook.react.uimanager.UIManagerModule") == null) { ++ // notifyIdle() ++ // return true ++ // } + +- val runnablesAreEmpty = uiManagerModuleReflected.isRunnablesListEmpty() +- val nonBatchesOpsEmpty = uiManagerModuleReflected.isNonBatchOpsEmpty() +- var operationQueueEmpty = uiManagerModuleReflected.isOperationQueueEmpty() ++ // val runnablesAreEmpty = uiManagerModuleReflected.isRunnablesListEmpty() ++ // val nonBatchesOpsEmpty = uiManagerModuleReflected.isNonBatchOpsEmpty() ++ // var operationQueueEmpty = uiManagerModuleReflected.isOperationQueueEmpty() + +- if (!operationQueueEmpty) { +- operationQueueEmpty = rn66workaround.isScarceUISwitchCommandStuckInQueue(uiManagerModuleReflected) +- } ++ // if (!operationQueueEmpty) { ++ // operationQueueEmpty = rn66workaround.isScarceUISwitchCommandStuckInQueue(uiManagerModuleReflected) ++ // } + +- if (runnablesAreEmpty && nonBatchesOpsEmpty && operationQueueEmpty) { +- notifyIdle() +- return true +- } ++ // if (runnablesAreEmpty && nonBatchesOpsEmpty && operationQueueEmpty) { ++ // notifyIdle() ++ // return true ++ // } + +- Log.i(LOG_TAG, "UIManagerModule is busy") +- Choreographer.getInstance().postFrameCallback(this) +- return false +- } catch (e: ReflectException) { +- Log.e(LOG_TAG, "Can't set up RN UIModule listener", e.cause) +- } ++ // Log.i(LOG_TAG, "UIManagerModule is busy") ++ // Log.w(LOG_TAG, "UIManagerModule is busy but damn the torpedoes!"); ++ // notifyIdle() ++ // return true; ++ // // Choreographer.getInstance().postFrameCallback(this); ++ // // return false; ++ // } catch (e: ReflectException) { ++ // Log.e(LOG_TAG, "Can't set up RN UIModule listener", e.cause) ++ // } + notifyIdle() + return true + } +diff --git a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js +index 585c99b..46e4b83 100644 +--- a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js ++++ b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js +@@ -272,7 +272,7 @@ class AppleSimUtils { + // want to make sure it isn't now. + if (err.code === 3 && + (err.stderr.includes(`the app is not currently running`) || +- err.stderr.includes(`The operation couldn’t be completed. found nothing to terminate`))) { ++ err.stderr.includes(`found nothing to terminate`))) { + return; + } + \ No newline at end of file diff --git a/RNGoogleMobileAdsExample/patches/detox+20.11.1.patch b/RNGoogleMobileAdsExample/patches/detox+20.11.1.patch deleted file mode 100644 index 96e7a78e..00000000 --- a/RNGoogleMobileAdsExample/patches/detox+20.11.1.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt b/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt -index 6bd4080..253cfb8 100644 ---- a/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt -+++ b/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt -@@ -6,10 +6,8 @@ import com.facebook.react.bridge.JavaOnlyMap - import com.facebook.react.uimanager.ReactStylesDiffMap - import com.wix.detox.common.DetoxErrors.DetoxIllegalStateException - import com.wix.detox.espresso.action.common.ReflectUtils --import com.facebook.react.views.slider.ReactSlider - import org.joor.Reflect - --private const val CLASS_REACT_SLIDER_LEGACY = "com.facebook.react.views.slider.ReactSlider" - private const val CLASS_REACT_SLIDER_COMMUNITY = "com.reactnativecommunity.slider.ReactSlider" - - abstract class SliderHelper(protected val slider: AppCompatSeekBar) { -@@ -48,8 +46,6 @@ abstract class SliderHelper(protected val slider: AppCompatSeekBar) { - - fun maybeCreate(view: View): SliderHelper? = - when { -- ReflectUtils.isAssignableFrom(view, CLASS_REACT_SLIDER_LEGACY) -- -> LegacySliderHelper(view as ReactSlider) - ReflectUtils.isAssignableFrom(view, CLASS_REACT_SLIDER_COMMUNITY) - -> CommunitySliderHelper(view as AppCompatSeekBar) - else -@@ -58,15 +54,6 @@ abstract class SliderHelper(protected val slider: AppCompatSeekBar) { - } - } - --private class LegacySliderHelper(slider: ReactSlider): SliderHelper(slider) { -- override fun setProgressJS(valueJS: Double) { -- val reactSliderManager = com.facebook.react.views.slider.ReactSliderManager() -- reactSliderManager.updateProperties(slider as ReactSlider, buildStyles("value", valueJS)) -- } -- -- private fun buildStyles(vararg keysAndValues: Any) = ReactStylesDiffMap(JavaOnlyMap.of(*keysAndValues)) --} -- - private class CommunitySliderHelper(slider: AppCompatSeekBar): SliderHelper(slider) { - override fun setProgressJS(valueJS: Double) { - val reactSliderManager = Class.forName("com.reactnativecommunity.slider.ReactSliderManager").newInstance() diff --git a/RNGoogleMobileAdsExample/yarn.lock b/RNGoogleMobileAdsExample/yarn.lock index 84b27b3a..ab245327 100644 --- a/RNGoogleMobileAdsExample/yarn.lock +++ b/RNGoogleMobileAdsExample/yarn.lock @@ -2492,11 +2492,6 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -2532,12 +2527,13 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bunyan-debug-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bunyan-debug-stream/-/bunyan-debug-stream-3.1.0.tgz#78309c67ad85cfb8f011155334152c49209dcda8" - integrity sha512-VaFYbDVdiSn3ZpdozrjZ8mFpxHXl26t11C1DKRQtbo0EgffqeFNrRLOGIESKVeGEvVu4qMxMSSxzNlSw7oTj7w== +bunyan-debug-stream@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/bunyan-debug-stream/-/bunyan-debug-stream-2.0.1.tgz#9bd7c7e30c7b2cf711317e9d37529b0464c3b164" + integrity sha512-MCEoqggU7NMt7f2O+PU8VkqfSkoQoa4lmN/OWhaRfqFRBF1Se2TOXQyLF6NxC+EtfrdthnquQe8jOe83fpEoGA== dependencies: - chalk "^4.1.2" + colors "1.4.0" + exception-formatter "^1.0.4" bunyan@^1.8.12: version "1.8.15" @@ -2554,11 +2550,6 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== -caf@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/caf/-/caf-15.0.1.tgz#28f1f17bd93dc4b5d95207ad07066eddf4768160" - integrity sha512-Xp/IK6vMwujxWZXra7djdYzPdPnEQKa7Mudu2wZgDQ3TJry1I0TgtjEgwZHpoBcMp68j4fb0/FZ1SJyMEgJrXQ== - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -2606,7 +2597,7 @@ caniuse-lite@^1.0.30001503: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz#90fabae294215c3495807eb24fc809e11dc2f0a8" integrity sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA== -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2759,6 +2750,11 @@ colorette@^1.0.7: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== +colors@1.4.0, colors@^1.0.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + command-exists@^1.2.8: version "1.2.9" resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" @@ -2966,28 +2962,22 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -detox@^20.6.0: - version "20.11.1" - resolved "https://registry.yarnpkg.com/detox/-/detox-20.11.1.tgz#d875cd0dd91036aef05ba9a076982dc4cbb7d5e0" - integrity sha512-CODytaKh3s6rYcVO7gaJyNbydGCLnFaP+pzW6cjexosE4Y21XJoCcNcgxMqgdZySjoE5mXYgTvEi5TreOwpVEw== +detox@^19: + version "19.13.0" + resolved "https://registry.yarnpkg.com/detox/-/detox-19.13.0.tgz#6eae8b4e5ef5ca913d465ddc5bd7855fe8834c5c" + integrity sha512-tKg0m5wlb4r1MISFtqPFXwdLncXWQhWaoAV6nuC3MmBGcJnTSrSa7wNZG26HhfEeR8c6eRUqMFHKefiZnWoO1Q== dependencies: ajv "^8.6.3" bunyan "^1.8.12" - bunyan-debug-stream "^3.1.0" - caf "^15.0.1" - chalk "^4.0.0" + bunyan-debug-stream "^2.0.1" + chalk "^2.4.2" child-process-promise "^2.2.0" - execa "^5.1.1" - find-up "^5.0.0" - fs-extra "^11.0.0" - funpermaproxy "^1.1.0" - glob "^8.0.3" + find-up "^4.1.0" + fs-extra "^4.0.2" + funpermaproxy "^1.0.1" ini "^1.3.4" - json-cycle "^1.3.0" - lodash "^4.17.11" - multi-sort-stream "^1.0.3" - multipipe "^4.0.0" - node-ipc "9.2.1" + lodash "^4.17.5" + minimist "^1.2.0" proper-lockfile "^3.0.2" resolve-from "^5.0.0" sanitize-filename "^1.6.1" @@ -2995,15 +2985,13 @@ detox@^20.6.0: serialize-error "^8.0.1" shell-quote "^1.7.2" signal-exit "^3.0.3" - stream-json "^1.7.4" - strip-ansi "^6.0.1" + tail "^2.0.0" telnet-client "1.2.8" tempfile "^2.0.0" - trace-event-lib "^1.3.1" which "^1.3.1" ws "^7.0.0" - yargs "^17.0.0" - yargs-parser "^21.0.0" + yargs "^16.0.3" + yargs-parser "^20.2.2" yargs-unparser "^2.0.0" diff-sequences@^29.4.3: @@ -3049,18 +3037,6 @@ dtrace-provider@~0.8: dependencies: nan "^2.14.0" -duplexer2@^0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - integrity sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA== - dependencies: - readable-stream "^2.0.2" - -easy-stack@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/easy-stack/-/easy-stack-1.0.1.tgz#8afe4264626988cabb11f3c704ccd0c835411066" - integrity sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w== - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -3399,17 +3375,19 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -event-pubsub@4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/event-pubsub/-/event-pubsub-4.3.0.tgz#f68d816bc29f1ec02c539dc58c8dd40ce72cb36e" - integrity sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ== - event-target-shim@^5.0.0, event-target-shim@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@^5.0.0, execa@^5.1.1: +exception-formatter@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/exception-formatter/-/exception-formatter-1.0.7.tgz#3291616b86fceabefa97aee6a4708032c6e3b96d" + integrity sha512-zV45vEsjytJrwfGq6X9qd1Ll56cW4NC2mhCO6lqwMk4ZpA1fZ6C3UiaQM/X7if+7wZFmCgss3ahp9B/uVFuLRw== + dependencies: + colors "^1.0.3" + +execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -3604,14 +3582,14 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== -fs-extra@^11.0.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" fs-extra@^8.1.0: version "8.1.0" @@ -3662,7 +3640,7 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -funpermaproxy@^1.1.0: +funpermaproxy@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/funpermaproxy/-/funpermaproxy-1.1.0.tgz#39cb0b8bea908051e4608d8a414f1d87b55bf557" integrity sha512-2Sp1hWuO8m5fqeFDusyhKqYPT+7rGLw34N3qonDcdRP8+n7M7Gl/yKp/q7oCxnnJ6pWCectOmLFJpsMU/++KrQ== @@ -3754,17 +3732,6 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3803,7 +3770,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.11, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -4662,18 +4629,6 @@ joi@^17.2.1: "@sideway/formula" "^3.0.1" "@sideway/pinpoint" "^2.0.0" -js-message@1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/js-message/-/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47" - integrity sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA== - -js-queue@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/js-queue/-/js-queue-2.0.2.tgz#0be590338f903b36c73d33c31883a821412cd482" - integrity sha512-pbKLsbCfi7kriM3s1J4DDCo7jQkI58zPLHi0heXPzPlj0hjUsm+FesPUbE0DSbIVIK503A36aUBoCN7eMFedkA== - dependencies: - easy-stack "^1.0.1" - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4739,11 +4694,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -json-cycle@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/json-cycle/-/json-cycle-1.5.0.tgz#b1f1d976eee16cef51d5f3d3b3caece3e90ba23a" - integrity sha512-GOehvd5PO2FeZ5T4c+RxobeT5a1PiGpF4u9/3+UvrMU4bhnVqzJY7hm39wg8PDCqkU91fWGH8qjWR4bn+wgq9w== - json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -4894,7 +4844,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -lodash@^4.17.11, lodash@^4.17.21: +lodash@^4.17.21, lodash@^4.17.5: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5341,14 +5291,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -5407,19 +5350,6 @@ ms@2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multi-sort-stream@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multi-sort-stream/-/multi-sort-stream-1.0.4.tgz#e4348edc9edc36e16333e531a90c0f166235cc99" - integrity sha512-hAZ8JOEQFbgdLe8HWZbb7gdZg0/yAIHF00Qfo3kd0rXFv96nXe+/bPTrKHZ2QMHugGX4FiAyET1Lt+jiB+7Qlg== - -multipipe@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-4.0.0.tgz#d302554ae664c1157dbfd1e8f98f03c517b3948a" - integrity sha512-jzcEAzFXoWwWwUbvHCNPwBlTz3WCWe/jPcXSmTfbo/VjRwRTfvLZ/bdvtiTdqCe8d4otCSsPCbhGYcX+eggpKQ== - dependencies: - duplexer2 "^0.1.2" - object-assign "^4.1.0" - mv@~2: version "2.1.1" resolved "https://registry.yarnpkg.com/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2" @@ -5504,15 +5434,6 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-ipc@9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/node-ipc/-/node-ipc-9.2.1.tgz#b32f66115f9d6ce841dc4ec2009d6a733f98bb6b" - integrity sha512-mJzaM6O3xHf9VT8BULvJSbdVbmHUKRNOH7zDDkCrA1/T+CVjq2WVIDfLt0azZRXpgArJtl3rtmEozrbXPZ9GaQ== - dependencies: - event-pubsub "4.3.0" - js-message "1.0.7" - js-queue "2.0.2" - node-releases@^2.0.12: version "2.0.13" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" @@ -5550,7 +5471,7 @@ ob1@0.76.7: resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.76.7.tgz#95b68fadafd47e7a6a0ad64cf80f3140dd6d1124" integrity sha512-BQdRtxxoUNfSoZxqeBGOyuT9nEYSn18xZHwGMb0mMVpn2NBcYbnyKY4BK2LIHRgw33CBGlUmE+KMaNvyTpLLtQ== -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -6068,7 +5989,16 @@ react@18.2.0: dependencies: loose-envify "^1.1.0" -readable-stream@^2.0.2, readable-stream@~2.3.6: +readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -6081,15 +6011,6 @@ readable-stream@^2.0.2, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.4.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -6595,18 +6516,6 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stream-chain@^2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09" - integrity sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA== - -stream-json@^1.7.4: - version "1.8.0" - resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.8.0.tgz#53f486b2e3b4496c506131f8d7260ba42def151c" - integrity sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw== - dependencies: - stream-chain "^2.2.5" - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -6749,6 +6658,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tail@^2.0.0: + version "2.2.6" + resolved "https://registry.yarnpkg.com/tail/-/tail-2.2.6.tgz#24abd701963639b896c42496d5f416216ec0b558" + integrity sha512-IQ6G4wK/t8VBauYiGPLx+d3fA5XjSVagjWV5SIYzvEvglbQjwEcukeYI68JOPpdydjxhZ9sIgzRlSmwSpphHyw== + telnet-client@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/telnet-client/-/telnet-client-1.2.8.tgz#946c0dadc8daa3f19bb40a3e898cb870403a4ca4" @@ -6852,13 +6766,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -trace-event-lib@^1.3.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/trace-event-lib/-/trace-event-lib-1.4.1.tgz#a749b8141650f56dcdecea760df4735f28d1ac6b" - integrity sha512-TOgFolKG8JFY+9d5EohGWMvwvteRafcyfPWWNIqcuD1W/FUvxWcy2MSCZ/beYHM63oYPHYHCd3tkbgCctHVP7w== - dependencies: - browser-process-hrtime "^1.0.0" - truncate-utf8-bytes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b" @@ -7265,7 +7172,7 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^21.0.0, yargs-parser@^21.1.1: +yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== @@ -7280,7 +7187,7 @@ yargs-unparser@2.0.0, yargs-unparser@^2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: +yargs@16.2.0, yargs@^16.0.3: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -7310,7 +7217,7 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.3.1, yargs@^17.6.2: +yargs@^17.3.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From dc99ab4a993ed84616316d00504087c87e922891 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 12:59:14 -0500 Subject: [PATCH 12/13] fix(android): windows-compat pathing, wait for async proc, propagate exception - windows needs to escape the absolute file path or config file not found - groovy procs are async, script was continuing before proc had finished leading to no output - if there is an empty config file output we can propagate that to main catch so the error message to user is clear but not duplicated --- android/app-json.gradle | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/android/app-json.gradle b/android/app-json.gradle index c18c2fc3..24bfabc5 100644 --- a/android/app-json.gradle +++ b/android/app-json.gradle @@ -33,23 +33,32 @@ if (configFile != null && configFile.exists()) { Object json = null try { + // On windows, we need to escape path separators in the path before exec'ing shell + def configFileAbsolutePath = configFile.absolutePath + if (System.properties['os.name'].toLowerCase().contains('windows')) { + configFileAbsolutePath = configFileAbsolutePath.replace("\\", "\\\\") + } + // rootProject.logger.warn "have a path of ${configFileAbsolutePath}" + // The config may be either in Expo javascript (app.config.js) or JSON (app.json) // If it is configured in Expo javascript, requiring it will generate a config // If it is configured in JSON, requiring it will also generate the config // So, use node to pull in the config file to get us a JSON string for either case - def configOutput = [ + def configOutput = new StringBuffer(); + def configReadProc = [ "node", "-e", - "console.log(JSON.stringify(require('${configFile.absolutePath}')));" + "console.log(JSON.stringify(require('${configFileAbsolutePath}')));" ] .execute(null, projectDir) - .text - .trim() + configReadProc.waitForProcessOutput(configOutput, System.err) + configOutput = configOutput.toString().trim() + // rootProject.logger.warn "got configOutput of ${configOutput.toString()}" if (configOutput && !configOutput.isEmpty()) { - json = new JsonSlurper().parseText(configOutput.toString()) + json = new JsonSlurper().parseText(configOutput) } else { - rootProject.logger.warn ":${project.name} received empty output while parsing ${configFile} found at ${configFile.toString()}." + throw new Exception(":${project.name} received empty output while parsing ${configFile} found at ${configFile.toString()}.") } } catch (Exception ignored) { rootProject.logger.warn ":${project.name} failed to parse ${configFile} found at ${configFile.toString()}." From 942e2225ae47e999c812fa3cceafff94c2fc8b9a Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 8 Jan 2024 13:14:40 -0500 Subject: [PATCH 13/13] test(ios): alter boost download source works around known upstream issue where jfrog is currently unreliable --- .../patches/react-native+0.72.2.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 RNGoogleMobileAdsExample/patches/react-native+0.72.2.patch diff --git a/RNGoogleMobileAdsExample/patches/react-native+0.72.2.patch b/RNGoogleMobileAdsExample/patches/react-native+0.72.2.patch new file mode 100644 index 00000000..ad785b77 --- /dev/null +++ b/RNGoogleMobileAdsExample/patches/react-native+0.72.2.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec +index 3d9331c..bbbb738 100644 +--- a/node_modules/react-native/third-party-podspecs/boost.podspec ++++ b/node_modules/react-native/third-party-podspecs/boost.podspec +@@ -10,7 +10,7 @@ Pod::Spec.new do |spec| + spec.homepage = 'http://www.boost.org' + spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.' + spec.authors = 'Rene Rivera' +- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2', ++ spec.source = { :http => 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2', + :sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' } + + # Pinning to the same version as React.podspec.