firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.53k stars 1.04k forks source link

cordova-universal-link-plugin not compatible with ios #219

Open billqian99 opened 6 years ago

billqian99 commented 6 years ago

Hi,

I tried this wonderful demo https://github.com/alexnu/IonicFirebaseUI

The demo runs properly on browser and Android (emulator). However it seems cordova-universal-links-plugin doesn't work for ios very well. "ionic build ios" gives the following error.

...

cordova prepare ios Error: Cannot find module '../plugman/platforms/ios'

[ERROR] An error occurred while running cordova prepare ios (exit code 1).

Has anyone seen this before. Appreciate any suggestion to resolve it.

ionic info

cli packages:

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 1.3.7
Cordova Platforms  : android 6.2.3 ios 4.5.1
Ionic Framework    : ionic-angular 3.3.0

System:

ios-deploy : 1.9.2 
Node       : v8.2.1
npm        : 5.4.2 
OS         : macOS Sierra
Xcode      : Xcode 9.0 Build version 9A235 

Misc:

backend : legacy

Thanks a million,

Bill

kukipei commented 6 years ago

I have the same problem

bojeil-google commented 6 years ago

I think this is related to this: https://github.com/nordnet/cordova-universal-links-plugin/issues/110

bnfrnz commented 6 years ago

I think this is related to this: nordnet/cordova-universal-links-plugin#110

Yes, that's causing the issue.

@billqian99, there's a workaround there, too.

Unfortunately it's not a permanent fix and the cordova-universal-links-plugin seems to be abandoned.

I think it's great that Google/Firebase started publishing guides for Cordova. I just wish they could allocate some resources on keeping them up-to-date as well. Cordova, Ionic, etc. are becoming such a big ecosystem. It'd be worth it.

I really want to use Firebase Dynamic Links but am about to give up and use Branch.io instead which is unfortunate because it's not free beyond 10k MAU...

bojeil-google commented 6 years ago

Hmm, it appears you are right @bnfrnz about the plugin not being maintained, I think we actually do not depend on cordova-universal-link-plugin for iOS. We depend on it for Android. In iOS, we use cordova-plugin-customurlscheme. Perhaps, we can relax the restriction that this be required in an iOS app.

bnfrnz commented 5 years ago

Thanks for the info. Our app is for both iOS and Android, so I guess we'll need both plugins anyway...

travisdahl commented 5 years ago

Having a similar issue with android implementation. Get cordova-universal-link-plugin is not installed message when i try to use the google login on android device even though it is in fact installed. Im just using the out of the box "Hello world" template from phonegap desktop (latest versions of everything) and then updated the config xml per the firebase docs. Any ideas on what to do about this? Or what the plan is for firebase to continue to (officially) support this if the cordova-universal-link-plugin is in fact abandoned?

nicolasgarnier commented 5 years ago

Maybe in the mean time we could depend on https://www.npmjs.com/package/cordova-universal-links-plugin-fix ? It's a fork containing the fix.

wdyt @bojeil-google ?

nicolasgarnier commented 5 years ago

@bojeil-google I sent cl/211051695 to change the dependency listed on https://firebase.google.com/docs/auth/web/cordova (i'm guessing that's the only place to change it ?)

bojeil-google commented 5 years ago

Thanks @nicolasgarnier. Sound like a good interim solution. I think the underlying SDK throws an error when the dependency is not there. Those may need to be updated too: https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/cordovahandler.js#L179

nicolasgarnier commented 5 years ago

Thx! I sent a PR for this.

https://github.com/firebase/firebase-js-sdk/pull/1187

phiferd commented 5 years ago

Hmm, it appears you are right @bnfrnz about the plugin not being maintained, I think we actually do not depend on cordova-universal-link-plugin for iOS. We depend on it for Android. In iOS, we use cordova-plugin-customurlscheme. Perhaps, we can relax the restriction that this be required in an iOS app. (ref: https://github.com/firebase/firebaseui-web/issues/219#issuecomment-404070936)

Yes, can we please relax this restriction if it is not required? On iOS, this breaks other plugins that rely on processing universal links (i.e. branch.io, incompatibilities).

And, while doing that may provide some workaround to my particular issue, continue to rely on this abandoned plugin seems like a really bad idea...