Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve the reference 'Firebase.Auth.AuthCredential #11

Open
RobertoOFonseca opened this issue Dec 6, 2019 · 7 comments
Open

Comments

@RobertoOFonseca
Copy link

RobertoOFonseca commented Dec 6, 2019

When compiling for release for IOS

Can't resolve the reference 'Firebase.Auth.AuthCredential Firebase.Auth.OAuthProvider::GetCredential(System.String,System.String,System.String)', referenced from the method 'Plugin.FirebaseAuth.IAuthCredential Plugin.FirebaseAuth.OAuthProviderWrapper::GetCredential(System.String,System.String,System.String)' in 'Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

@KennyDizi
Copy link

got the same issue
MTOUCH: Error MT2101: Can't resolve the reference 'Firebase.Auth.AuthCredential Firebase.Auth.OAuthProvider::GetCredential(System.String,System.String,System.String)', referenced from the method 'Plugin.FirebaseAuth.IAuthCredential Plugin.FirebaseAuth.OAuthProviderWrapper::GetCredential(System.String,System.String,System.String)' in 'Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. (MT2101) (connect.me.mobile.iOS)

@KennyDizi
Copy link

Release Mode Only
Mono 6.6
VS 8.4 Preview
Lastest XF 4.4

@RichardSV15
Copy link

I get the same error, it goes away when i set the linker behavior to: Don't Link
(Link Framework SDKs ONLY) makes it come back.

My only issue is that when i do that and try to archive to release i get "xamarin archive error There was an error unzipping the file zip The specified path, file name, or both are too long."
error and cannot archive. Tried many troubleshooting methods and can't resolve it. Not sure if this is related but that's my 2 cents.

@RichardSV15
Copy link

After investigation I realized that Plugin.FirebaseAuth (2.0.0) references xamarin.firebase.ios.core (>=5.1.3). This is an issue when you have a plugin like (Xamarin.Firebase.iOS.DynamicLinks 4.0.1.1) that depends on xamarin.firebase.ios.core (>= 6.1.0.1). You get a Native linking failed error which can only be resolved by manually installing Xamarin.Firebase.iOS.Auth (6.2.1.2) which doesn't appear to have the reference 'Firebase.Auth.AuthCredential Firebase.Auth.OAuthProvider::GetCredential(System.String,System.String,System.String)'

@f-miyu
Is there a way that Plugin.FirebaseAuth can be updated to depend on xamarin.firebase.ios.core (>= 6.1.0.1)? The same is true for others like Plugin.FirebaseStorage & Plugin.CloudFirestore

[downgrading in not an option because previous version of dynamic links don't work on ios. Specifically resolving shortlinks's long url]

@vhugogarcia
Copy link

vhugogarcia commented Apr 6, 2020

I'm facing the same issue for release mode. @RichardSV15 any workaround in the meantime?

I manually installed the Xamarin.Firebase.iOS.Auth (6.2.1.2) but that error is still present if I set Include SDKs only when compiling.

@RichardSV15
Copy link

@vhugogarcia yes, the work around is to stick with Plugin.FirebaseAuth (2.0.0) that references xamarin.firebase.ios.core (>=5.1.3)... If you have anything (dynamiclinks, firestore, analytics) that referencea anything higher than (5.1.3) it will not build. If you absolutely need a higher version I recommend downgrading to that lowest point get it compile and build correctly and troubleshoot after that

@vhugogarcia
Copy link

@RichardSV15 Thanks for the quick answer. I was running a test and I was able to compile, archive and upload to TestFlight on Apple Store Connect. Using the following configuration:

  • Set Link All Assemblies in release mode
  • Add manually the following packages: Xamarin.Firebase.iOS.Auth (6.2.1.2), Xamarin.Firebase.iOS.Core (6.1.0.1),
  • Delete /obj and /bin folders and then close VS for mac
  • Open VS for mac make sure you are on release mode and rebuild the iOS project!
  • Once compiled, archive it and that should be all

if you want to set the linker to "SDK only" then, download the fork from https://github.com/xamarindevelopervietnam/Plugin.FirebaseAuth and just remove the references to GetCredentials, if you don't need them. In my case, since I only require Email Auth, I had no issues with the removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants