-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Created Expo config plugin #1013
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
base: master
Are you sure you want to change the base?
Created Expo config plugin #1013
Conversation
Looking good! I’m on leave ATM but will review this once I’m back! |
People can use this out-of-tree solution in the meantime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I finally managed to give this a try. I left a single comment, but after giving this a try I'm honestly not very inclined to merge it.
After this change, we have a whopping 2800 packages as dependencies 😱 (check with `npm ls | wc -l) vs the 12 the project has today.
Now, I do want to facilitate the lives of those using Expo, and AFAIS they just need to use the package you created (https://github.com/Expo/config-plugins/tree/master/packages/react-native-webrtc) right? What problems do you foresee with that approach? The manifest items the package takes care of have not changed in years, so I'm not concerned about hypothetical incompatibilities.
Thoughts?
@saghul the dependency you're concerned about has many dependencies in common with a standard React Native project so it's just accessing the code that's already in the node modules folder. We can stick with the Further, I've noticed that the config plugin doesn't fully work with package due to a couple of issues. The main one being that Bitcode is not available on iOS, causing the binary to not be fully compilable in Release mode:
I guess running this script fixes that, but we've spec'd config plugins to avoid running fetch requests. Generally all of the native code is shipped in the node module. I'd love to get this fixed, so let me know if you have any ideas for when this should run. Another issue is that this module often causes the yarn.lock/Podfile.lock to get corrupted, requiring the lock files to be nuked. |
Good point, I'll check it out again.
Does Expo default to using bitcode? Why? It's not mandatory and the advantages are not a clean cut IMHO (Jitsi Meet is built with bitcode, but have no other choice because we have an Apple Watch target). The WebRTC framework with bitcode is ~1GB uncompressed...
As I mentioned, the framework is just huge, I don't see a way around it TBH. Well yes, defaulting to no bitcode :-)
I have never run into this myself, can you show an example? Podfile thrashing is usually due to a mismatched CocoaPods version. Can't speak about yarn since I don't use it. |
@saghul is there any way that the bitcode could be shipped as a separate NPM package? If it's not possible to ship an optional/addon package perhaps a |
- Expo SDK 46 versions the `@expo/config-plugins` package in a user's project meaning this package no longer needs to depend on `@expo/config-plugins`. - Update to meet the latest requirements. - Use latest designations for installation guide.
This comment was marked as outdated.
This comment was marked as outdated.
Needs updating to reflect the bitcode removal but maybe include in the next stable update? |
👍 I won't have time to work on this though. |
Never really used Expo but i can definitely test the pr and ensure things are up to scratch for inclusion 👍🏻 |
Will need any up to date changes bringing in from here. Will be looking to include an updated version of this with the New Arch update. |
Why
With Expo SDK 41 we've rolled out an interface called config plugins which lets users add native modules that aren't in the Expo Go app to their native cloud builds and locally when prebuilding.
This is a highly requested package so I've created the plugin personally.
How
app.plugin.js
as the main entry point to the plugin. Plugins must run in at node LTS environments (currently that means 14 and greater).Test Plan
npm pack
in the packageyarn add react-native-webrtc@../react-native-webrtc/react-native-webrtc-1.89.1.tgz
react-native-webrtc
to the plugins array and build the native app locally withexpo prebuild
andyarn ios
,yarn android
. We plan to further automate these steps withexpo install
andexpo run
commands.expo config --type introspect
showed all of the desired config changes in AndroidManifest, Info.plist, and entitlements files.Modified some values and in the config plugin and updated with
expo prebuild
andyarn ios
,yarn android
.