TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

Plugin.Firebase.iOS cannot be resolved #125

Closed maxbartunik closed 10 months ago

maxbartunik commented 1 year ago

I am attempting to use Plugin.Firebase in a MAUI project. However, after install (either nuget or #65) Plugin.Firebase.iOS does not seem to exist. Android, Auth, etc. resolve correctly.

In my MAUIProgram.cs:

#if IOS
using Plugin.Firebase.iOS; //<-- does not exist
#else
using Plugin.Firebase.Android;
#endif

"The type or namespace name 'iOS' does not exist in the namespace 'Plugin.Firebase' (are you missing an assembly reference?)"

I am using VS 17.4.4 on Windows.

I would appreciate any hints as to what I am missing...

nabilakhlaque commented 1 year ago

Why is this closed? This is still an issue.

FerArreguin92 commented 1 year ago

Does anyone have any news regarding this issue? I'm using net6.0 and have this issue. @TobiasBuchholz

sej69 commented 1 year ago

I think the path should be: using Plugin.Firebase.Bundled.Platforms.iOS;

However, even though it's showing as resolved in code (in the using statement), I get a: The type or namespace iOS does not exist in the namespace 'Plugin.Firebase.Bundled.Platforms'

TobiasBuchholz commented 1 year ago

Yeah tha'ts correct, with version 2.0.0 the namespace got cleaned up and changed a bit. Please provide an example project so I can look into it. Also what OS and Visual Studio version are you using?

K1LL3R234 commented 1 year ago

It should be this

if IOS

using UIKit; using Plugin.Firebase.Core.Platforms.iOS;

else

using Plugin.Firebase.Core.Platforms.Android;

endif

maxbartunik commented 1 year ago

This issue is fixed for me - I was not able to fix the existing MAUI project, however (one or all of) following steps worked:

Things that did not help:

TobiasBuchholz commented 10 months ago

Since I haven't heard from you in more than 30 days, I hope this issue is no longer affecting you. If it is, please reopen this issue and provide the requested information so that I can look into it further. Thank you!