-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Alternative to app.json based configuration #596
Comments
Hi @DoctorJohn, both proposals sound good to me. Since Expo is now being recommended the issues will rise even more and making it compatible by default would benefit us all in the end. Would be great if we could reduce the issues reported by Expo Go users as I have been getting pretty tired seeing those... I am back from holiday so I'll happily review those (breaking) changes. |
I'm willing to continue maintenance on the automated ios_config script, I find it helpful, though I recognize many are familiar with it, those scripts exist because user support is reduced. I like all the rest of the line if thinking, just hope there is a way to keep the native assist for bare users. Perhaps a check to see if it's configured in the "new way" whatever that is (config plugin sounds great, moving things where Expo wants them sounds useful...) then if it's the new way skip it otherwise assume it's bare mode and configure that way? I may be talking nonsense and that's not possible but I can't imagine how much more non expo support we'd have here and in firebase if native file manipulation was mandatory... |
Good idea @mikehardy. I think we can adjust ios_config.sh to early exit if app.json contains a react-native-google-mobile-ads (expo config) plugin? |
Thanks for the feedback to both of you! Regarding offering config plugin and the current approach: We could theoretically keep the
Given the argumentation above I would recommend against checking for the usage of the config plugin itself and instead check whether the Regarding the assistance of bare RN users: I feel like those users are more competent than ever given that the RN website has been directing newcomers to Expo for at least a few years now. IMHO the amount of issues raised by those users regarding touching native files should be low(?) but I lean towards trusting Mikes judgement on this given how many issues he's triaging in various repositories. That being said: Our All I'm trying to say with the last part is: we don't necessarily have to maintain our custom I'll start working on the config plugin for now :) |
Update: So far I have a working config plugin, tests and I made Now I'm stuck with |
🎉 This issue has been resolved in version 14.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi everyone,
I feel like this might be an unpopular proposal, but I want to discuss replacing the
app.json
-based configuration approach with a more standard React Native way.Specifically, I propose:
AndroidManifest.xm
andInfo.plist
. This feels pretty natural to me because I already have to do this with various other React Native packages. It's also well document in the upstream Google Mobile Ads documentation for iOS and Android.And here is why:
app.config.js
andapp.config.ts
support. However, working with the js/ts files in this context is not trivial¹ and may require executing these files in an appropriate runtime environmentios_config.sh
feels already hard enough and PRs touching them tent to take much longer to get mergedapp.json
file under anextra
object, which will like require us to handle yet another case³AndroidManifest.xm
andInfo.plist
files and personally I feel like that's the natural way of doing itClosing thoughts:
Many of these points mention Expo because we get many reports⁴ from Expo users and now that Expo is the officially recommended React Native framework⁴, I feel like they'll keep coming.
What are your thoughts on this @mikehardy and @dylancom? Feel free to argue against it, this is supposed to be a discussion. Personally I'm not necessarily unhappy with the current approach I just feel like this proposal could be more sustainable, simpler, more standardized and comes with some benefits. Oh, in case it's not obvious: I'll happily implement all these changes.
References:
¹: for example see: #521
²: https://expo.fyi/root-expo-object
³: related PR: #584
⁴: active issue on app.json related expo config issues : #581
⁵: https://reactnative.dev/blog/2024/06/25/use-a-framework-to-build-react-native-apps
The text was updated successfully, but these errors were encountered: