EddyVerbruggen / Custom-URL-scheme

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

After iOS Universal Links is set, handleOpenURL no longer responds, what should I do? #328

Open super-maoMao opened 3 years ago

super-maoMao commented 3 years ago

ionic 3.20.0 ios cordova 4.5.5 cordova-plugin-customurlscheme 4.3.0 xcode 9.2 swfit 3.0

(window as any).handleOpenURL method no longer responds

guanyuan commented 3 years ago

same issue here。 anyone else income this problem?

rolinger commented 2 years ago

Anyone have an update on this? I too think I am experiencing the same issue. Works just fine on Android. But as I started dabbling in Universal Links, its no longer working.

rolinger commented 2 years ago

After a bit of testing, I discovered that simply defining an Associated Domain in the iOS Xcode project will prevent the openHandleURL from working. With or without actual Universal Links defined in the config.xml file (using the plugin). However, I saw on another thread, someone using Capacitor, had to wrap the openHandleURL function in an event listener to get it to work. Something like:

 App.addListener('appUrlOpen', data => {
    window.handleOpenURL(data.url);
  });

I am assuming something similar can be done here for regular Cordova and Ionic projects. I won't be testing it on the current rev of my project....I will move to ULs in the next rev because I will still need URL Schemes to work.