-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(cli): enable cleartext for live reload #7563
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
Conversation
Hello, Sorry for commenting on a long-merged PR, but since this change is still in the main branch I would like to ask the following to the PR author: Would it be preferrable to use a match pattern for the clearTextString? Thank you (I am not able to use the livereload option on an Android 10 device without using --ssl, I always get ERR_CLEARTEXT_NOT_PERMITTED even after configuring both the server in capacitor config and the networkSecurityConfig in the AndroidManifest to specifically allow for cleartext traffic.) |
This doesn't write on the user's AndroidManifest.xml but in a module which we generate for Cordova plugins and the whole AndroidManifest.xml is generated by the CLI. If you have more questions you can ask on the Ionic Forums, on Ionic discord or on the discussions section of capacitor repository |
This PR enables cleartext when using live reload by directly writing into the
capacitor-cordova-android-plugins
'sAndroidManifest.xml
, and removes it once the command is stopped.It no longer overrides the original
extConfig
object but instead modifies the platform'scapacitor.config.json
after sync.Added a TODO to remove
editExtConfigForLiveReload
since it's no longer being used.Added a TODO to remove the last param of
editCapConfigForLiveReload
as it's not being used.Didn't remove any of them at the moment as people could be using the
CapLiveReloadHelper
directly, so removing them is breaking.I've put the
process.on('SIGINT'
inside a promise to prevent multiple calls, it was being called three times.There is an alternate PR, but it requires users to declare the
cleartext
themselves and doesn't work if using the--no-sync
option.closes #7323
closes #7528