EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://
1.03k stars 367 forks source link

handleOpenURL method is not called on iOS when running with Capacitor #332

Open jh-gh opened 3 years ago

jh-gh commented 3 years ago

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);
  });
rmitache commented 3 years ago

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

menzen commented 3 years ago

Same here on a app cold start and cordova ...

ppetree commented 3 years ago

As an FYI, I'm using voltbuilder and this worked as expected on iOS 12.x, 13.x and 14.x.

raeesaa commented 8 months ago

@rmitache did you find any solution for this?