Deep linking and appUrlOpen
See original GitHub issueDescribe the bug Hi @IT-MikeS, first of i want to thank you for all the work you are doing and for your reply in my other issue, I did not get the opportunity to thank you before the issue was closed 😄
The issue this time around has to do with Deep linking again and how it works in v3 (3.0.0-rc6) of the project. Currently I get zero deep-link url:s through to the Capacitor plugin App addUrlListener. In capacitor v2 and @capacitor-community/electron v1.4.x i could (when using electron <12) see the App.addListener('appUrlListener',data => {})
being triggered. This changed when upgrading Capacitor and @capacitor-community/electron to v3 versions.
So far I can think of two possible issues and I would be very grateful for any answer which could help me understand what is wrong
- Since electron 12 they changed the contextIsolation to be true by default which seems to cause some issue with plugins (#74), I still don’t know if this is causing the same kind of issues for the App plugging of Capacitor. If I try turn off contextIsolation in the options like this
mainWindow: {
windowOptions: {
webPreferences: { contextIsolation: false }
}
}
i still get nothing through to the appUrlListener. Will deep-links not work with @capacitor-community/electron v3.x? 2. Capacitor V3 App plugin and its appUrlListener are not compatible with @capacitor-community/electron v3.0.0-x deep-linking. Are there any solutions to this?
To Reproduce Steps to reproduce the behavior:
I’ve created a small repo which only contains a CRA and some react router stuff to run a small application which listens for deep links.
- Clone the repo git@github.com:vilasp/capacitor.git
- Run
npm run build
- Run
npx cap sync @capacitor-community/electron
- Run
cd electron
- Run
npm run electron:build-windows
- Install the MSI and open the application
- Open the devtools of the electron application
- Open the link
electronboogie://signin-oidc
in chrome - Verify in devtools that no console message about the url from [8] is logged
Expected behavior
When the link electronboogie://signin-oidc
is entered from Chrome the application should gain focus and the appUrlListener which is registered should fire
Screenshots No need i think
Desktop (please complete the following information):
- OS: Win 10 (20H2)
- Browser, Chromium
- Version: Chromium version of the Electron version used by the electron-builder dependency
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
A couple of questions to follow up on this (also saw #91 which i think has the same issue),
Thanks again for your quick responses!
Wonderful @IT-MikeS! Thank you very much for your work 😄