Automatically convert code between Xamarin iOS and Xamarin Android

I use Xamarin to create an iOS application with a very custom layout. My plan is to create exactly the same application in Xamarin Android. I really want to do this, and I'm also interested in learning about Android, but do a lot of work. Xamarin Forms shares the GUI between platforms on some extensions, but it makes me wonder if there are any plans for automatic code conversion between iOS and Android. Automatic conversion would be time-consuming and would allow the developer to choose their favorite development platform.

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

Thanks!

+5
source share
1 answer

No, there are no plans to convert the code. Xamarin gives you the ability to split as much code as possible across platforms. You can use Xamarin.Forms to create a user interface once and get it natively on all platforms. If you don't like the limitations of Xamarin.Forms, you can choose Xamarin.iOS and Xamarin.Android to create your own user interfaces. MvvmCross allows you to use the MVVM pattern. In doing so, you only need to recreate the user interface itself without having to enter the navigation logic twice.

If you do not know whether to choose Xamarin.Forms or not, look here: When to use Xamarin.Forms vs Xamarin Native?

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

Xamarin already provides everything you need to create user interfaces for different platforms without any problems. It is up to you to make the most of it.

+14
source

Source: https://habr.com/ru/post/1233939/


All Articles