react-native-google-mobile-ads
react-native-google-mobile-ads copied to clipboard
[🐛] IOS Xcode Build Error : ios_appd_id not found, invalid multibyte char (US-ASCII)
Issue
I am using Expo to create my projects. I have used expo run:ios
and expo run:android
to test my app and it works fine.
However, things happen when i start up the Xcode and try to achieve the app.
ERROR MSG i received: ios_appd_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.
Complete Error Log is:
info: -> RNGoogleMobileAds build script started info: 1) Locating app.json file: info: (1 of 2) Searching in '/Users/user/Work/MyAppName/MyAppName' for a app.json file. info: app.json found at /Users/user/Work/MyAppName/MyAppName/app.json -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) -e:6: invalid multibyte char (US-ASCII) info: 2) Injecting Info.plist entries: -> 0) google_mobile_ads_json_raw string e30= error: ios_appd_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.
And in app.json, I did put
"react-native-google-mobile-ads": { "android_app_id": "ca-app-pub-xxxxx~xxxxx", "ios_app_id": "ca-app-pub-xxxxx~xxxxx" }, outside of "expo"
Project Files
Javascript
Click To Expand
package.json
:
# N/A
admob.json
:
# N/A
iOS
Click To Expand
ios/Podfile
:
# N/A
Android
Click To Expand
android/build.gradle
:
// N/A
android/app/build.gradle
:
// N/A
android/settings.gradle
:
// N/A
AndroidManifest.xml
:
<!-- N/A -->
Environment
Click To Expand
react-native info
output:
OUTPUT GOES HERE
-
Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
-
Are you using
TypeScript
?-
Y/N
&VERSION
-
- 👉 Check out
Invertase
on Twitter for updates on the library.
Is it possible to share either commands that would start from init of a new project and get to this error, or a public repo? Test ad Id is fine
I have same error
I am having the same error, I was using expo 44 now I upgraded to 45, I was using react native 64.3 no I upgraded to 68.2 and still this is not working. I am stuck for a day and I need help.
after command : eas build -p ios --profile development --local
`[RUN_FASTLANE] › Executing moonode » [CP-User] [RNGoogleMobileAds] Configuration [RUN_FASTLANE] ❌ error: ios_appd_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it.
[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸ PhaseScriptExecution [CP-User]\ [RNGoogleMobileAds]\ Configuration /var/folders/03/wfl0sfhd43x3fsjrjqrvcmxh0000gn/T/eas-build-local-nodejs/4af0f931-e2eb-4d80-85c0-ff105c5c8077/build/ios/build/Build/Intermediates.noindex/moonode.build/Debug-iphonesimulator/moonode.build/Script-90438811F98DA9F6DE4FDDBA.sh (in target 'moonode' from project 'moonode')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] 2022-07-22 19:53:44.697 xcodebuild[98229:1300834] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
[RUN_FASTLANE] 2022-07-22 19:53:44.697 xcodebuild[98229:1300834] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
[RUN_FASTLANE] ** BUILD FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] PhaseScriptExecution [CP-User]\ [RNGoogleMobileAds]\ Configuration /var/folders/03/wfl0sfhd43x3fsjrjqrvcmxh0000gn/T/eas-build-local-nodejs/4af0f931-e2eb-4d80-85c0-ff105c5c8077/build/ios/build/Build/Intermediates.noindex/moonode.build/Debug-iphonesimulator/moonode.build/Script-90438811F98DA9F6DE4FDDBA.sh (in target 'moonode' from project 'moonode')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE]
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | Build environment |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.207.0 |
[RUN_FASTLANE] | sdk | iPhoneOS15.4.sdk |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE]
[RUN_FASTLANE] Looks like fastlane ran into a build/archive error with your project
[RUN_FASTLANE] It's hard to tell what's causing the error, so we wrote some guides on how
[RUN_FASTLANE] to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[RUN_FASTLANE] Before submitting an issue on GitHub, please follow the guide above and make
[RUN_FASTLANE] sure your project is set up correctly.
[RUN_FASTLANE] fastlane uses xcodebuild
commands to generate your binary, you can see the
[RUN_FASTLANE] the full commands printed out in yellow in the above log.
[RUN_FASTLANE] Make sure to inspect the output above, as usually you'll find more error information there
[RUN_FASTLANE]
[RUN_FASTLANE] [!] Error building the application - see the log above
[RUN_FASTLANE] Error: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
Build failed Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases. Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.`
MY APP.json got this :
{ "expo": { "name": "moonode", "slug": "moonode", "privacy": "public", "androidStatusBar": { "backgroundColor": "#000000" }, "platforms": ["ios", "android", "web"], "owner": "moonode", "version": "2.5.2", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, "updates": { "fallbackToCacheTimeout": 0 }, "assetBundlePatterns": ["**/*"], "notification": { "icon": "./assets/iconAndroid.png", "color": "#FFD700", "androidCollapsedTitle": "#FFD700", "iosDisplayInForeground": false }, "ios": { ... }
},
"android": {
...
},
"icon": "./assets/icon.png"
},
"description": ""
}, "react-native-google-mobile-ads": { "android_app_id": "...", "ios_app_id": "..." }
}
When I remove react-native-google-mobile-ads from package.json and I run it again it passes all the tests and the build is successful.
I addes iOS_appD_id as mentioned in the error, but still doesn't work. thanks
Thank you for your help @mikehardy
I'm travelling so don't have any capacity to run exploring reproductions , and don't have any Expo experience anyway, so I'm not a big help here unfortunately, and won't be much help at all for around a month more. I can say that the error message does seem to have a typo, sorry for that, but the test in the build script is a real test for the necessary Json variable and for whatever reason it is not finding it. Keep digging into that. I recall someone indicated app.json.js or similar was some mechanism expo had, and they had to make a real app.json before things worked. Maybe that's an avenue to explore
Thanks anyway
I'm travelling so don't have any capacity to run exploring reproductions , and don't have any Expo experience anyway, so I'm not a big help here unfortunately, and won't be much help at all for around a month more. I can say that the error message does seem to have a typo, sorry for that, but the test in the build script is a real test for the necessary Json variable and for whatever reason it is not finding it. Keep digging into that. I recall someone indicated app.json.js or similar was some mechanism expo had, and they had to make a real app.json before things worked. Maybe that's an avenue to explore
Thanks, I have read through that post too. Their problem occured becuz expo has a mechanism that takes an app.config.js and generates the app.json afterward. But in my case, I am already using the app.json directly. In Android, there seems to be no problem. I guess is there any problem with the extraction progress of ios_app_id from the app.json, maybe some verification setting is too strict which inhibits the process?
Maybe? The code for that would be right around here https://github.com/invertase/react-native-google-mobile-ads/blob/main/ios_config.sh - things dealing with IOS_APP_ID - if you are able to instrument that (then re-run pod install
! It does not actually update that script until you install it in the project, then rebuild the app) and determine a root cause that would be amazing. I tested it as much as I thought was necessary during development (of course...) but I'm human and make mistakes of course. Maybe I missed something?
I'm having this issue with one of my projects, it's working with another project having exactly the same package version, and almost identical app.json, downgrading to version 6.3.0 seems to fix the issue, but obviously this is not ideal.
I am having the same issue with version 7.0.1, but only on ios using the expo EAS build system. Android works fine, and my ios build only fails when I am running it for production, development builds using standalone binaries through EAS work perfectly fine.
Downgrading to 6.3.0 also fixes that error for me, but then the standalone (development) binary doesn't open on iOS, I can't even get past the splash screen to actually connect to my local dev server. Does anyone have any ideas as to why this might be the case?
When I create a fresh app with (literally) the exact same code, package configuration, eas build configuration etc. this error does not show up for me, which is very strange. I've posted some more info here: https://stackoverflow.com/questions/73370621/expo-app-crashes-with-react-native-google-mobile-ads-ios-appd-id-key-not-found
Is anyone aware of how I might try to delete and reinstall ios pods in a managed expo project?
Normally I'd say we need a solid reproduction (https://stackoverflow.com/help/mcve) like the commands you would use to initialize a new app from scratch, add this module to it, add test ids and do the build, but now I understand based on this:
When I create a fresh app with (literally) the exact same code, package configuration, eas build configuration etc. this error does not show up for me
That is not reproducible. What is the proposed action you would take, if you were maintainer :thinking: ?
@mikehardy I mainly posted that result for anyone else who might have this issue, I couldn't expect a maintainer to debug an issue that may not exist. My best guess is that, in my case, something that I did to affect my environment - some configuration change or upgrading packages - caused an issue but I am unable to identify the cause at this time.
I also got the same error. However, I removed the multibyte characters from app.json and the build succeeded. If I could specify an encoding such as UTF-8 in the script that parses app.json, I think that would solve the problem, but I don't know how to do that.
ios_config.sh L80
_RN_ROOT_EXISTS=$(ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')
Can you post an example multibyte appid for a reproduction? Or much better (that is, it won't take days/weeks waiting on someone else or me to get to it) hunt around stackoverflow for how to correctly parse any kind of strings in ruby/shell so this interpolation works?
I got the same issue @jackchengck then I tried to split app.json into 2 parts like this: In the app.json, before copying and pasting the following code
{
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
from the https://docs.page/invertase/react-native-google-mobile-ads#configure-outbound-requests
I moved
"name": "...", "displayName": "...",
to a new file named app.config.json is the same directory as app.json.
Conclusion:
app.json
{
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
app.config.json
{
"name": "...",
"displayName": "...",
}
Note that: because you changed the app.json -> app.config.json so wherever you implement data from app.json you need to change to app.config,json For example in my index.js has a line import {name as appName} from './app.json' change it in to import {name as appName} from './app.config.json' Wish you guys will solve this problem, thank you.
I also use expo, and there is an "expo" section in app.json besides "react-native-google-mobile-ads". Since my app is for Japan, I set the app name and message in Japanese in the "expo" section. For example, here is the structure.
{
"expo": {
"name": "日本語のアプリ"
},
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
This error occurs in the ruby command, and I solved it by adding the -Ku option to the ruby command in lines 44 and 80 of ios_config.sh. The final response is to use patch-package to add the -Ku option to the ruby command.
(Note: ios_config.sh is incorporated into the "Build Phases" script when "pod install" is done, so "pod install" is required after rewriting ios_config.sh.)
The ruby command seems to cause this problem depending on the environment because the character encoding to be processed changes depending on the shell's location
.
In my case, when building from xcode, I found that the location
of the "Build Phases" script is different from the location
of the terminal on my mac.
It seems that "RFC" and "Ecma" stipulate the use of UTF-8 character set for json files, so it is better to add this option so that json files can be parsed regardless of the environment.
Please forgive me if there are some strange wording in the text, as I translated it with deepl. I hope this helps everyone.
@gawa1019 that's fantastic information! If you post a PR to ios_config.sh that has what you have tested + working that would be a great help for people I think!
{
"name": "monster",
"displayName": "먼스터",
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
{
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
Remove the name
and displayName
of the app.json file temporarily and build it
This method enables Archive to run successfully.
@gawa1019 fantastic!
This piece of information was critical to my understanding, it allowed me to reproduce the issue:
The ruby command seems to cause this problem depending on the environment because the character encoding to be processed changes depending on the shell's location. In my case, when building from xcode, I found that the location of the "Build Phases" script is different from the location of the terminal on my mac.
I typically build from the command line when testing, so I was never able to reproduce. Building inside Xcode showed the problem
I would love it someone tried the patch-set from this action on the related PR: https://github.com/invertase/react-native-google-mobile-ads/actions/runs/3074716427
or you can directly patch with this
diff --git a/node_modules/react-native-google-mobile-ads/ios_config.sh b/node_modules/react-native-google-mobile-ads/ios_config.sh
index 61251e5..da0dcf9 100755
--- a/node_modules/react-native-google-mobile-ads/ios_config.sh
+++ b/node_modules/react-native-google-mobile-ads/ios_config.sh
@@ -41,7 +41,7 @@ function setPlistValue {
function getJsonKeyValue () {
if [[ ${_RN_ROOT_EXISTS} ]]; then
- ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']"
+ ruby -KU -e "require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']"
else
echo ""
fi;
@@ -77,7 +77,7 @@ done
if [[ ${_SEARCH_RESULT} ]]; then
_JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}")
- _RN_ROOT_EXISTS=$(ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')
+ _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
if ! python3 --version >/dev/null 2>&1; then echo "python3 not found, app.json file processing error." && exit 1; fi
@@ -131,7 +131,7 @@ if ! [[ -f "${_TARGET_PLIST}" ]]; then
fi
if ! [[ $_IOS_APP_ID ]]; then
- echo "error: ios_appd_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it."
+ echo "error: ios_app_id key not found in react-native-google-mobile-ads key in app.json. App will crash without it."
exit 1
fi
and if it works I will merge this and publish it
Still not work for me...
My app.json
{
"name": "HRn",
"displayName": "HRn",
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-3519487726843195~6274410212",
"ios_app_id": "ca-app-pub-3519487726843195~3265103490"
}
}
I've tried fix "ios_config.sh"
function getJsonKeyValue () {
if [[ ${_RN_ROOT_EXISTS} ]]; then
ruby -KU -e "config.encoding = 'utf-8'; require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']"
else
echo ""
fi;
}
if [[ ${_SEARCH_RESULT} ]]; then
_JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}")
_RN_ROOT_EXISTS=$(ruby -KU -e "config.encoding = 'utf-8'; require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')
Solve It!
Fix CP Command [Project Root]/ios/[Project Name]/RNGoogleMobileAds.xcodeproj/project.pbxproj
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 | 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.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 GADApplicationIdentier 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 echo \"ruby is: \"\n ruby --version\n echo locale is $LC_ALL\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";
@minemos is this something that needs to be change in the PR? I think you might be missing the connection between the script changes and when they are active. You must run pod install
for the script to be injected into the project. If you do not run pod install there will be effect from any change you make, that seems like what happened
:tada: This issue has been resolved in version 8.1.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
still have this error in "react-native-google-mobile-ads": "^12.0.0",