TobiasBuchholz / Plugin.Firebase

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

Fix docs for getting started with the plugin per target framework #235

Closed vikern22 closed 10 months ago

vikern22 commented 10 months ago

Fixes issues from #234

TobiasBuchholz commented 10 months ago

I don't really understand why this would make a difference, but I've made the preprocessor directives in the sample and test projects more explicit now, as well as in the basic readme. So this PR is not needed anymore, but thank you for the hint! :)

vikern22 commented 10 months ago

It makes a difference as the #else clause will break all other builds - but your solution does the trick now :) thanks!

TobiasBuchholz commented 10 months ago

But why does it break all other builds? With this plugin you can only build against iOS or android, so if it's not iOS it has to be android...anyways, it's more explicit now, so that's better, thanks again :)

vikern22 commented 10 months ago

Because if not iOS, include Android package..

#if IOS
using Plugin.Firebase.Core.Platforms.iOS;
#else
using Plugin.Firebase.Core.Platforms.Android;
#endif

With the new solution you are able to target other frameworks - and just ignore the push part. (e.g. in our case, we can run our tests)

TobiasBuchholz commented 10 months ago

Ah right, if you want to ignore the plugin alltogether, then it makes sense, I see :)