0
votes

I am a ios developer , We have a requirement where we have to develop an app (with Maps,GPS tracking,Charts) in both ios and android, We are planning to use Xamarin cross platform to develop so that we can write common business logic for both the projects,

As per my research its not recommended to use xamarin.forms for the apps which needs more platforms specific functionalities like Maps,GPS tracking,Charts

by my research I found Xamrin.ios and xamarin.android are best approach to implement more platform specific functionalities

My question is , Xamarin.ios and xamarin.android are they 2 seperate projects? could I able to share business logic between those? As per my understanding in xamarin.ios and xamrin.android we will be calling our native ios/android APIs and frameworks hence we cant share the code , am I right?

Can we share code in xamarin (Xamarin.ios/xamarin.android) if we dont use Xamarin.forms? Wat are the benefits we will get if we use xamarin.ios/xamrin.android instead of Native development with obj c / Java ?

1
Sign up for a full eval copy of Xamarin and grab the demo project Tasky and that will show you in-depth on how you share code between two 'native' UIs - SushiHangover

1 Answers

4
votes

You can have a Xamarin.android and Xamarin.iOS project in a single solution and have code sharing with a common business logic using MVVM design pattern , PCL (Portable Class Libraries) and linked source files. For the case of platform specific code in a shared code , inversion of control can be used

You try to squeeze as much as common code behind as possible , so you will only have to implement the GUI twice (Android and iOS)