I've been using Xamarin for a year now, but my company now requires us to develop a Library that can be used by other apps, which are most likely not using Xamarin. What would be the easiest way of doing this?
I figured using C and C++ is the best solution since we need to run it literally everywhere. But I still haven't figured out how to setup everything.
Have any of you tried to do this?
What I have in mind is either use makefiles or have a platform specific project for each one of the platforms I need to compile. Makefiles are easier once you get started, but I'm having a hard time getting information on how to make one for Android and iOS.
I am not sure how stable the cross-platform C++ stuff in on VS but I think you should still start from Android NDK. For iOS create a static library with the C or C++ code inside.
http://developer.android.com/ndk/guides/index.html
If you can expose a C API then that would be the easiest way to go. Otherwise you probably need Java and ObjC binding project on top of the C++ code.
If the other apps you need to support aren't C++ applications either then you could look into SWIG as another option for more broader support.
Answers
Does this help?
http://blogs.msdn.com/b/vcblog/archive/2015/06/26/hyperlapse-cross-platform-mobile-development-with-visual-c-and-xamarin.aspx
I have looked into using Visual Studio 2015 new C++ stuff but didn't know if anyone was actually using it already so thank you for the post. When I tried to use it I wasn't able to install the vcremote on my Mac, it always gives me Build errors. Have you had any luck with that?
I am not sure how stable the cross-platform C++ stuff in on VS but I think you should still start from Android NDK. For iOS create a static library with the C or C++ code inside.
http://developer.android.com/ndk/guides/index.html
If you can expose a C API then that would be the easiest way to go. Otherwise you probably need Java and ObjC binding project on top of the C++ code.
If the other apps you need to support aren't C++ applications either then you could look into SWIG as another option for more broader support.
I was able to run a C sample in Android so I already have that one setup. What I am considering doing is to just make an XCode project to compile the library directly instead of using VS as the middleman, but I'm not so sure about how easy would it be to export the files or maintain 2 projects.
I'll take a look into SWIG, it generates the interface files on the high-level language I want correct? That is probably a good way of having the lib available to our customers.