apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 988 forks source link

handleOpenURL can't work after upgrade to Cordova IOS 6 #1077

Closed xinhuadian closed 1 year ago

xinhuadian commented 3 years ago

Bug Report

Problem

This issue happen after our app upgrade from Cordova IOS 5.1 to 6.

What is expected to happen?

When Our app open another app(such like Microsoft Authenticator), and Microsoft Authenticator call back to our app. expected behavior is handleOpenURL will be called when back to our app.

What does actually happen?

HandleOpenURL not be triggered . And this issue NOT happen when use Microsoft Authenticator directly open our app instead of our app -> Microsoft Authenticator --> our app. And this issue also NOT happen in our app--> Microsoft Authenticator(wait for 5 seconds)--> our app.

Information

I debug the issue ,found that processOpenUrl in CDVHandleOpenURL.m have been executed . but the handleOpenURL javascript not be executed .

  NSString* jsString = [NSString stringWithFormat:@"document.addEventListener('deviceready',function(){if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}});", url.absoluteString];

    [weakSelf.webViewEngine evaluateJavaScript:jsString completionHandler:nil];

Environment, Platform, Device

I test in IOS 13,14 . All same behavior.

Version information

Cordova 9.
Cordova IOS 6.1

Checklist

dpogue commented 1 year ago

I've marked this issue as stale because it's been over a year with no further comments. If this is still an issue in the latest cordova-ios version and an up-to-date iOS version, please let us know. Otherwise, this issue will be closed.

dpogue commented 1 year ago

Closing as stale.