Building Mobile Apps Using Xamarin.forms And Visual Studio For Mac

  1. Building Mobile Apps Using Xamarin.forms And Visual Studio For Mac Free

Thanks for the info, I'm going to take a closer look, because maybe I misunderstood the whole process at first. I thought bindings would require me first to do bindings in Java for the C wrapper to the libnode.so library and then bindings in C# for the Java library, am I right? The way I'm currently doing it is by P/Invoke-ing the methods in the C wrapper directly and adding the.so library to the Xamarin project. The only problem is that I have to build the library from Android Studio.

You should be able to use P/Invoke directly to the.so on the Android side as well. You don't need to do c#-java-C/C. (Though you can if you want.) As for building the.so from VS, you have a couple options.

You can create a VS C NDK project (which I assume node is using on the Android side.) but it may require you to create the project, then copy the source files in as opposed to importing and NDK project. The other option is just to create a VS project that calls an external script which then calls the command line project to build the.SO via command line NDK. I haven't built the node binaries but if they do any custom pre-build steps, you may have to go this option if they have any pre-build shell scripts or such.

Plus it is easier to keep in sync with the node project if that's something you want to do. Since this is a Forms App, I presume you want to do the iOS side as well?

Building Mobile Apps Using Xamarin.forms And Visual Studio For Mac Free

You'll have to do something similar for XCode. Options analogous to the above. Having done this kind of thing before for a C/C lib, I just build the native.so files with Android Studio/XCode and had a post build step on each that would copy them into the right place. The C/C code changed so infrequently that I only had to build occasionally. What I'm getting at is you might want to consider the benefit of being able to build the node.so files for Android/iOS in visual studio vs. The pain of making it work.

Apps

PM me if you need some help. Thanks, I was able to add the native library to both targets (iOS and Android) in the Xamarin Forms solution. The Xcode project is easy to setup since one can have a project that only builds the native library, for Android Studio I'm still figure out a way to generate the shared library as the output instead of the.APK or.AAR package. Once I get both native projects (Xcode and Android Studio) generating the native library for each platform, I'll try to build the libraries from Visual Studio with a task.