Closed renatomserra closed 2 months ago
I won't have time to help you troubleshoot, sorry. It's possible to add more echo statements in this file and see what's going on as it evaluates things in order to find out why it doesn't like or cannot find your app.json
https://github.com/invertase/react-native-google-mobile-ads/blob/main/ios_config.sh
Note that you need to run pod install
after making changes to it, that file is injected into the project config file as a thing that xcodebuild should run, and pod install is how that happens so if you make a change to ios_config.sh and do not run pod install, it will be very confusing why your change did not take effect...
amazing thanks @mikehardy i was missing this step Note that you need to run pod install after making changes to it
to successfully be able to debug myself. i spent 3h changing and tyring to figure out why my changes to the file werent applying :D
@renatomserra I feel your pain. I have also wasted time not realizing why changes weren't being applied.
What do you think
@mikehardy i think i would have missed that comment still, id suggest instead adding it to the logs in cases of failure as tahts when devs will care about it.
So i "sorted" my issue but im not sure why.
changing file lookup maxdepth from 2 to 1 found the right app.json.
_SEARCH_RESULT=$(find "$_CURRENT_SEARCH_DIR" -maxdepth 1 \( -name ${_JSON_FILE_NAME} -o -name ${_JS_APP_CONFIG_FILE_NAME} \) -print | /usr/bin/head -n 1)
I noticed that that in the log i posted above it says it found app.json in /web-build
but there is no such directory.
Im wondering if it picked something up from node modules.
I noticed that that in the log i posted above it says it found app.json in /web-build but there is no such directory. Im wondering if it picked something up from node modules.
... 🤔 that is really strange - if you can figure out the what+why there and we can harden the script up that may help others in the future
@mikehardy i think i would have missed that comment still, id suggest instead adding it to the logs in cases of failure as tahts when devs will care about it.
Unfortunately I'm not sure where exactly I'd do that - the problem with Xcode build logs is that even I have a hard time figuring out exactly where the build logs are so I think a lot of the dev population would miss that as well, additionally there's no failure most of the time - it is just the old script running not the new one you haven't installed with pod install yet - how to detect that and only emit something then, in a place people can see it?
I am going to go ahead and merge the comment as it does no harm at least and could help but I can't think of a better way yet. If you can I'm definitely open to suggestions
Glad you're moving along either way
@mikehardy I had this error with an app that has Let's
in the name, after I removed the apostrophe it worked. Hope that helps resolving it.
info: -> RNGoogleMobileAds build script started
info: 1) Locating app.json file:
info: (1 of 2) Searching in '/home/Repositories/lets' for a app.json/app.config.js file.
info: app.json found at /home/Repositories/lets/app.json
-e:3: syntax error, unexpected local variable or method, expecting ')'
"name": "Let's",
^
-e: compile error (SyntaxError)
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
What happened?
When running
npm run ios
getting the following:Im on an ejected Expo. I feel like i followed the instructions correctly and ive tried all the suggestions in closed issues i could find. I might be missing something obvious after looking so much :D Tried downgrading a few versions still getting the same. Happy to provide more info or try anything that helps me find the issue.
Thank you!
Platforms
Android and iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
android/build.gradle
No response
android/app/build.gradle
No response
android/settings.gradle
No response
AndroidManifest.xml
No response