f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Sudden Errors adding Plugin #73

Closed MickCG closed 3 years ago

MickCG commented 3 years ago

I have been working on an app and I'll not go into all the problems I have had getting to a stable framework? Anyway suddenly and not sure if it was from the recent updates to VS, but I started getting a lot like 40 errors. The errors were odd and didn't seem to apply to anything I had been doing. So I decided to start a new project using just the C# create cross platform Xamarin.Forms project and use flyout. That compiled on both android and iOS. I then figured let's add each in turn of the nuget packages I use in the failing project. First added Plugin.CloudFirestore. Android compiled fine, but the iOS build failed with a string of a lot of the following: Severity Code Description Project File Line Suppression State Error Native linking failed, undefined Objective-C class: GULAppDelegateSwizzler. The symbol '_OBJCCLASS$_GULAppDelegateSwizzler' could not be found in any of the libraries or frameworks linked with your application. ACIMJ.iOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 425

MickCG commented 3 years ago

I still seem to have a problem compiling on my Mac, but I think it is unrelated. I guess my biggest problem was not putting the initializing line in my AppDelegate.cs file, thanks in advance!

mrobraven commented 3 years ago

Hi, if you're still struggling with this issue:

I had a very similar problem and it was because I was using an older version of one of the other Xamarin.Firebase libraries. The error also sometimes displays when using the wrong Firebase libraries (that aren't made for Xamarin)

A few very common libraries that can throw native linking errors are:

Which NuGet packages do you have installed?

MickCG commented 3 years ago

Thanks for getting back to me but I'm good!

mrobraven commented 3 years ago

No worries, be sure to close this issue if you have solved it yourself!