Xamarin iOS/Android compatibility

Hi all,
is xamarin ios/android supported in some way?

Many Thanks!

Hi @Luca_Fattorini,

take what I am saying here with a grain of salt, since I am not a Xamarin developer, but I do think you have two options.

You can link the native library, but as far as I know that is only supported for Objective-C and Java so you couldn’t use the Swift library in that regard. Also I am not sure how that is working if you are building apps for iOS and Android from the same codebase.

The other options is to use a C# library (forum1, forum2). I think it would be best to ask there if you need help with the C# libraries.

Hi @brototyp,
many thanks for the suggestion. Bind the official SDK probably is the actual best solution (but I don’t really like bind third party libraries for obvious reasons).
Do you know if on roadmap there are some action for implement an “official porting” or an “official binding” from Matomo?

In past, for other projects, I already “binded” libraries for analythics (loss of time and maintenance problems) and, in Xamarin development context, have an official porting should be preferential reason to choose a different product.

What do you think about?

Hi @Luca_Fattorini, yes I am totally on your side here. As far as I know there is no official C# version or Xamarin binding. I think an official binding would be the preferred way, so we can leverage the advances in the bound version. Do you think that is something you could help us with?

Do you think that is something you could help us with?

Probably yes, I will start as soon as possible the binding of iOS SDK.
On my side, obviously, it would be a pleasure sharing the project!

Many thanks for the support, I’ll keep you aligned!

Hi @brototyp, I am trying to bind the swift library but it is not pretty easy and for sure not the coolest to mantain. I seen there is an older version written in objc (Version 3?).
The objc version should be pretty easy to bind because it ia officially supported, what are the differences between swift and objc libraries? Are both updated?

I can continue trying the “swift way” if you say that it should be the preferred strategy for the future.
What is your opinion on this?

Hi @Luca_Fattorini, thanks for the update and discussing the issue. Version 3 of the SDK isn’t supported and updated anymore.If it is somehow possible i would vote for using the Swift version. I think binding swift SDKs will become more and more important in the Xamarin world and thus might become easier as well? I want to try to not support two different versions on the same platform to avoid the double effort and also possible differences between both.
Please let me know if you think it is feasible to go on with the Swift version.

Hi @brototyp, we did it! I have to clean the solution but it seems work :slight_smile:
Soon Matomo will officially support Xamarin.iOS too :yum:

Keep you aligned

1 Like

Awesome. That sounds great. Let me know if I can help you anyhow.

Fyi: There is also this Github project for Xamarin tracking for Matomo in our Integrations page: https://github.com/zauberzeug/xamarin.piwik