Hello everyone,
I am encountering an issue with URL scheme conflicts in an app using Capacitor, specifically on iOS.
Here’s the situation:
- On Android, the app uses the
https://
scheme to load local files without any issues.
- However, on iOS, the app is expected to use the
capacitor://
scheme for loading local files.
The problem arises when the app on iOS receives a URL with the https://
scheme, such as https://example.com
, instead of the capacitor://
scheme. In this case, instead of loading the local file within the app, the URL is opened in an external browser.
Has anyone experienced similar issues or have any solutions to ensure that URLs are correctly handled within the app on iOS? Any advice or pointers would be greatly appreciated.
Thank you in advance!
You should never navigate to external sites inside the Capacitor WebView, you should use Browser plugin for opening external websites.
If you were an user and you were using an app, what would you thing if your the whole app UI disappears and you get an external website instead?
Anyway, if you really really need it, there is an allowNavigation
configuration option where you can add an Array of allowed urls where you app can navigate to, but it’s not recommended.
Well I am currently trying to implement an easy login feature.
- click a specific easy login button on the login page
- use a browser plugin to go to the login page
- once logged in, I don’t come back to the app, I stay logged in in the browser.
And when i close the browser (plugin), the app shows the login page without login info.
Why is that???