Custom-URL-scheme
Custom-URL-scheme copied to clipboard
handleOpenURL method is not called on iOS when running with Capacitor
I am porting an application that uses this plugin from Cordova to Capacitor.
I have configured the CFBundleURLTypes in info.plist and my app does get launched successfully on iOS when another app opens my custom URL.
However, the handleOpenURL method does not get called on iOS. It does get called on Android ... provided that you run with the latest version of this plugin (5.0.2 or later which has a fix for Capacitor Android).
As a workaround, I am using functionality in the Capacitor App plugin to call my handleOpenURL method like this:
App.addListener('appUrlOpen', data => {
window.handleOpenURL(data.url);
});
I am getting this problem with Cordova as well. Do you by any chance have any ideas on whether your workaround could work without Capacitor ? Thanks
Same here on a app cold start and cordova ...
As an FYI, I'm using voltbuilder and this worked as expected on iOS 12.x, 13.x and 14.x.
@rmitache did you find any solution for this?