Closed TaylorDale closed 1 month ago
@DoctorJohn 👀
I must admit my plan for project setups like this might have been a little short sighted. The current implementation expects any project depending on the expo
package to use our expo config plugin. This works for bare RN projects using expo too (via expo prebuild) but I only just realized how inconvenient that is when custom android and ios folders are already in place. In this case they need to be regenerated, which is not a problem for my bare projects but it might be for yours.
Thinking about this for the past few minutes I came up with an alternative way to decide whether our expo config plugin or app.json based configuration workflow should trigger. I started drafting a PR addressing this issue.
custom android and ios folders are already in place
Bang on this is main issue for me.
Appreciate the fix-in-progress.
Here's a quick update:
Currently ios_config.sh
and build.gradle
bail out whenever "expo" is listed as a dependency in package.json
. This works great for managed expo projects, non-managed expo projects fully relying on prebuild, and bare RN projects without any expo.
To address this issue I originally planned to check whether the top level "react-native-google-mobile-ads" key exists in app.json
. However, this makes it harder to warn users when they simply forgot to configure the package.
In my next attempt I tried to rely on npx expo-env-info
which outputs whether the project is using the managed expo workflow.
I just checked the expo-env-info
source code to see how they perform that check. All they do is checking whether ios
or android
folders exists. So I'm going to use this as a condition to differentiate between bare RN projects which should use the old config workflow and managed expo projects which must use the config plugin.
:tada: This issue has been resolved in version 14.2.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
What happened?
I use a standalone expo module in my bare RN project ( https://github.com/expo/expo/tree/sdk-49/packages/expo-av#installation-in-bare-react-native-projects )
The new detection method (Check if "expo" module installed) trips the expo config reader, however I don't believe it is working - I tried converting my config over to the expo style app.json config, and I get crashes due to no app ID.
Is being in this halfway house problematic for this new way of reading config files? Does expo "config" carry over to the project if you are using otherwise a react-native only project?
Platforms
Android and iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
android/build.gradle
android/app/build.gradle
android/settings.gradle
AndroidManifest.xml