GoogleAnalyticsForXamarinForms
GoogleAnalyticsForXamarinForms copied to clipboard
.NETStandard support
I can't install this in a .NETStardard library which Xamarin is now suggesting everyone use. Can this be supported?
Hi @helzgate, I wold like to move library to .NETStardard. But I need more time.
Fully understand this'll take some time, just wondering if there's a timeline or an ETA?
Thanks!
@Nixon-Joseph App Center works. I would suggest that and they have a xamarin forms plugin. It's MS version of GA.
Ahh okay. Thanks. But if you're not in a rush to update, I think I'll just implement firebase on android and ios and run it as a dependancy service.
Hi @Nixon-Joseph for now I don't have enough time to open source, so I will appreciate if you help me.
@helzgate Yes, App Center is good tool, but Google analytics is little bit different
Sorry totally didn't realize that the message I replied to wasn't you!
I unfortunately don't have a lot of time myself, and the only computer I have at home is Linux only, and I haven't figured out how to run mono yet.
@Nixon-Joseph, I'm able to use this nuget package in my NETStandard 1.1 project. You have to add "PackageTargetFallback" statement. See more here. But the problem is that I can't update my project to NETStandard 2.0 because of this. The maximum version which supports PCL libraries is NETStandard1.2...
Hi @LGFox, if you still use this library I will update this package
@KSemenenko, well, ~24 000 of us still using it. I don't have any alternatives for Xamarin.Forms (actually I do but they aren't so popular). )))
But when you will migrate to .NETStandard, it's better to stick to the lowest NETStandard version which you could use. Higher NETStandard version means broader API for you, and worse compatibility for me (because higher versions of NETStandard can use the lower ones, but NOT vice versa). So if you don't need higher NETStandard version - please, don't use it. )))
I would have also like to have used this, but cannot since .NET Standard 2.0 is not supported.
@bigcoops @LGFox @Nixon-Joseph can you check this version https://www.nuget.org/packages/ksemenenko.GoogleAnalytics/1.0.4-pre
Thank you! And you used netstandard1.0 - really cool! I checked it on Android/iOS. There's a breaking change: Plugin.GoogleAnalytics.dll isn't accessible for netstandard1.0. That means I can't use a static class GoogleAnalytics.Current in my netstandard library.
So I created a custom class in my netstandard library with a static Plugin.GoogleAnalytics.Abstractions.IGoogleAnalytics property, and in the native Android/iOS library I assigned GoogleAnalytics.Current to that property. It works for me. In order words, I can use a DI container to create an object of IGoogleAnalytics and use it in my netstandard library.
@KSemenenko , Is this how the nuget package supposed to work in custom netstandard libraries?
@LGFox maybe you know what version of .net standard is needed to make it more convenient for you to use it?
@KSemenenko netstandard1.0, that you used, is the best choice for everyone here. ))) My question is: are you intentionally removed "Plugin.GoogleAnalytics.dll" from the netstandard folder in the nuget package?
I deleted it so that it does not conflict with the native version. but if it is needed, I will return it. @LGFox
@KSemenenko, sorry, I still don't understand the reason (I don't have experience in building nuget packages), but yes, that would be nice to return it!