Livereload does not work with livereload-url

Hi,

I´m trying to run a capacitor livereload run on ios. For some reason, I need a specific livereload url, so I run:

ionic cap run ios --livereload --external --livereload-url=capacitor://mytestdomain.test:8101

This works, but when I change code in my project, the server does not refresh. When I run

ionic cap run ios --livereload --external

The server refreshes on code changes (but I need the custom url)

Any ideas?

why do you need a specific livereload url?

if you use that url, then it will load the local assets, not the live reload server, that’s for how Capacitor works internally, any url starting with capacitor:// will load local assets.

I need https on livereload, otherwise one of my javascript libraries does not work. When I just add --ssl to ionic serve, it does not work: HTTPS support for `ionic serve` and Cordova livereload (--ssl) · Issue #3305 · ionic-team/ionic-cli · GitHub

My solution is now to start livereload with

ionic cap run ios --external --livereload-url=capacitor://mytestdomain.test:8100

And then run a server with a self signed certificate on

ng run app:serve --host=0.0.0.0 --port=8100 --ssl --public-host=rg-eat.test --ssl-cert=/host_system_mkcert_folder/${RG_MKCERT_CERT_NAME} --ssl-key=/host_system_mkcert_folder/${RG_MKCERT_KEY_NAME}

This works on iOs. On Android, I have to additionally do the “Accept self signed certificate hack” from Jesus SPC: HTTPS support for `ionic serve` and Cordova livereload (--ssl) · Issue #3305 · ionic-team/ionic-cli · GitHub