nventive / Binding.Intercom

Xamarin Binding for Intercom
Other
13 stars 6 forks source link

Binding for Latest version of Intercom SDK #47

Closed sudhanshu79 closed 1 month ago

sudhanshu79 commented 7 months ago

When shall be the Binding from Latest version of Intercom SDK be available ? @benventive @juliecantin @Xiaoy312 @carldebilly @jeremiethibeault @gchafouleas

sudhanshu79 commented 6 months ago

When shall be the Binding from Latest version of Intercom SDK be available ? @benventive @juliecantin @Xiaoy312 @carldebilly @jeremiethibeault @gchafouleas

juliecantin commented 6 months ago

Hi @sudhanshu79, we've recently updated the iOS portion of the binding to target a very recent version (16.6.2). As for Android, we currently target version 12 and have no immediate plans to update to the latest version (15). However, you're welcome to make a PR to update the Android portion of the binding.

sudhanshu79 commented 1 month ago

@juliecantin Can I have some guidance or just a Kick start to Update this Binding to latest version of SDK? If you got some steps

juliecantin commented 1 month ago

Hi @sudhanshu79, official documentation is hard to come by for a traditional .NET 8 binding. It is a rather arduous process.

There's a new method of creating a .NET binding called Native Library Interop (or Slim Binding). If you are new to bindings, it might be valuable to create a new binding using this more recent, simpler method, rather than trying to update an existing .NET binding like the one we have in this repository. Here's a link to a Microsoft article about these new bindings. I haven't tried those yet, but it seems promising.

Alternatively, if you prefer to update the Android binding in this repo, this is the documentation I can find now: Post about Xamarin.Android bindings How to migrate a Xamarin.Android binding to .NET

General outline of a plan to update the Android binding : 1- Go to the Maven page and download the new version of the Android Intercom library to replace the one in the Binding.Intercom.Android.Base project. 2- Go through the list of Maven dependencies this version of the library has and compare this to the references in the binding project. 2a- If the reference has been updated to a higher version, update the version in the binding project 2b- If it's a new reference, add it.

There are two ways of referencing a native library in the Android binding project - either reference an existing nuget package (make sure it supports .NET and not just Xamarin) or create a binding project in the solution and reference it. So, if you need to update a reference, try to find an existing nuget binding which matches the version you need to target. If it doesn't exist, then create a binding project in the solution and reference it. Note that each native library in turn has dependencies, and those need to be referenced as well, and so on.

3- Try to compile the solution and fix any compilation errors which arise. 4- Try to use this new version of the binding in the .NET project you use Intercom in, and fix any errors which arise. 5- Once the new version of the binding is satisfactory, create a PR to create a new official version of the binding.

The references I listed above can help in fixing those errors, but a lot of it is trial and error and unfortunately, I won't be able to offer much support to you for this process. Best of luck!

sudhanshu79 commented 1 month ago

Thank you for the reply @juliecantin . I am closing this Issue for now :)