-
Notifications
You must be signed in to change notification settings - Fork 35
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
WIP: Add react-native-system-setting #114
base: master
Are you sure you want to change the base?
Conversation
Hi @davidgovea, First of all, thanks for the support and contributions 👍 Regarding your first question, there is actually a way to add/update build settings of projects included in the Container, trough the pbxproj transformer. For example, here is how we use it to set the {
"name": "ern-container-transformer-pbxproj",
"extra": {
"setBuildSettings": [
{
"targetProjectPath": "**/Libraries/**/*.xcodeproj",
"buildSettings": [
{
"configurations": [
"Debug",
"Release"
],
"settings": {
"BITCODE_GENERATION_MODE": "bitcode"
}
}
]
}
]
}
} You can update I assume this should also answer your second bullet point. For Android, we would probably have to add some kind of new transformer (something like an AndroidManifest transformer) to update the container manifest to inject permissions dynamically (for now though it could be achieved by using the That being said, even though you could use the transformer for iOS, rather than But the So, to put it in a nutshell :
As for the last bullet point, you should just add |
@belemaire thank you so much for the detailed response! Makes complete sense. Great tips on transformer-vs-plugin, too: I'll play around with the newer Next steps for me, for this PR:
|
@davidgovea |
@davidgovea
You can add this to the |
9e18d07
to
a3a034b
Compare
This is a very handy plugin: react-native-system-setting.
The plugin config is pretty straightforward (no external deps), but it does rely on an advanced
replaceInFile
directive on iOS.On iOS, bluetooth functionality is behind a preprocessor macro, so that it could be fully excluded and not expand the privacy requirements.
Our use-case required the bluetooth functionality, so we've hadrcoded the macro in the iOS configuration.
At first, I tried using a
build-config
container transform, but the macro needs to be set in the library's xcodeproj, not inElectrodeContainer
.Since that didn't work, I fell back to a bare replace. 2 cases were needed to handle the syntax in debug & release settings.
Marked this as WIP -- definitely some things to discuss here.
build-config
edit on the imported plugin xcodeproj?manifest.json
? We've been using this config since[email protected]
or so.Thanks for taking the time to review this. Ern seems healthy -- we're excited to be using it!