Cordova-plugin-firebasex: bug: openUrl conflict on iOS

Created on 4 Mar 2020  路  3Comments  路  Source: dpa99c/cordova-plugin-firebasex

Bug report

Current behavior:

By implementing Google SignIn it is required to add an openURL handler on iOS, by doing so the notification is not propagated to the webview anymore (window.handleOpenURL is not called anymore):

As a result this plugin is incompatible with e.g. cordova-plugin-customurlscheme.

Expected behavior:
When opening an app with a custom URL scheme the notification should be propagated to the webview.

Steps to reproduce:
Use this plugin in combination with an custom URL scheme, then open the app with that custom URL scheme -> window.handleOpenURL is never called.

Environment information

  • Cordova CLI version
  • Cordova platform version

    • ios 5.0.1

  • Plugins & versions installed in project (including this plugin)
com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-android-play-services-gradle-release 4.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-custom-config 5.1.0 "cordova-custom-config"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-android-fingerprint-auth 1.5.0 "FingerprintAuth"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-customurlscheme 5.0.0 "Custom URL scheme"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-enable-multidex 0.2.0 "Enable Multidex"
cordova-plugin-firebasex 8.1.0 "Google Firebase Plugin"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-safariviewcontroller 1.6.0 "SafariViewController"
cordova-plugin-sms-retriever-manager 0.0.2 "Device"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-taptic-engine 2.1.0 "Taptic Engine"
cordova-plugin-touch-id 3.3.1 "Touch ID"
cordova-plugin-whitelist 1.3.4 "Whitelist"
  • Dev machine OS and version, e.g.

    • macOS Catalina



      • 10.15



Related code:
The problematic override was added here:
https://github.com/dpa99c/cordova-plugin-firebasex/blob/4c9a5275bc957efb4a921acfd8816624bcc53af0/src/ios/AppDelegate%2BFirebasePlugin.m#L129

handleOpenURL notification in CDVPlugin:
https://github.com/apache/cordova-ios/blob/29224370fff52dd3ee210bdf49571f338c0770c6/CordovaLib/Classes/Public/CDVPlugin.m#L130

Other information:

Cordova triggers a notification (handleOpenURL) when the app is opened by a custom url which is broadcasted to all plugins, this notification can be used instead of overriding the global openURL handler. Related Cordova documentation can be found here

bug ios runtime issue

All 3 comments

Thanks for reporting - I didn't realise CDVPlugin exposed a handler for this method.
It should therefore be possible to modify this plugin to use the override instead on an app delegate which should resolve the issue.

@Yeah I also did not know about all the handlers that are available until I ran into this issue and did some research on possible solutions! :)

v9.0.0 has now been published which fixes this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luboslav picture luboslav  路  6Comments

JumBay picture JumBay  路  7Comments

capc0 picture capc0  路  5Comments

osamasado picture osamasado  路  6Comments

zmoshansky picture zmoshansky  路  6Comments