Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically convert code between Xamarin iOS and Xamarin Android [closed]

I have been using Xamarin to build an iOS app with a very customized layout. My plan is to build exactly the same app in Xamarin Android. I am eager to do it and I am interested into getting to know Android as well but it's alot of work to repeat. Xamarin Forms shares GUI code across platforms to some extends but it makes me wonder if there are any plans to automatically convert code between iOS and Android. Auto conversion would safe alot of time and allows the developer to choose his favorite platform to develop on.

There are sites like https://www.myappconverter.com/ and http://www.apportable.com/ for converting between native languages not sure how reliable they are. My question is if there any future plans or open source projects for auto converting Xamarin iOS to Android and vice versa?

Thanks!

like image 504
doorman Avatar asked Oct 17 '15 21:10

doorman


1 Answers

No, there are no plans about converting code. Xamarin gives you the opportunity to share as much code as possible over different platforms. You can use Xamarin.Forms to create a UI once and get it rendered natively on all platforms. In case you don't like the restrictions of Xamarin.Forms you can chose Xamarin.iOS and Xamarin.Android to build the native UIs. MvvmCross allows you to use the MVVM-Pattern. By doing this, you only need to recreate the user interface itself without writing navigation logic twice.

If you don't know whether to chose Xamarin.Forms or not, take a look here: When to use Xamarin.Forms vs Xamarin Native?

Converting code automatically is a bad idea in general. Platforms and languages are so different that the result of an automatic conversion never feels great.

Xamarin already provides everything you need to create UIs for different platforms without much pain. It's on you to take the best out of it.

like image 121
Wosi Avatar answered Sep 23 '22 22:09

Wosi