Xamarin became popular for building mobile applications because it brought the programming language C# to Android, iOS and Windows Phone apps, allowing developers to use their existing coding expertise for mobile app development.
But that isn't really what makes the Xamarin framework special.
When developers use Xamarin, they are able to share code between Android, iOS and Windows Phone while still producing native mobile apps – which means the app functions just as well as if it had been written in the specific framework for that phone, rather than a cross-platform framework.
How code sharing still creates native mobile apps
Sharing code across mobile development platforms means that you can share code between iOS, Android and Windows, rather than having to rewrite 100% new code if you wanted an app that worked on more than one operating system.
Arguably the most important thing about Xamarin, and the thing that differs most from its closest alternatives, is that the final product is the same as if you had used the native language.
For example, a photography app being used on an iPhone should ideally be using code meant for an iPhone and an iPhone camera, not something written for Android that may work on iPhone, but not make the best use of the iPhone camera's features.
In this example, Xamarin offers the opportunity to share some of the general logic behind the photography app, without recycling the unsuitable Android code. The code that cannot be shared is rewritten, which will likely be a fair chunk of it.
Xamarin doesn't require you to write generic code that detracts from a specific mobile device, it instead shares the code where possible, but not all the time.
Anything you can do while creating an iOS app with Swift (the development language used for Apple) you can also do in Xamarin.
Big changes for Xamarin mobile development
Earlier this year Xamarin was acquired by Microsoft for a reported $400million. It was then announced at the Build 2016 keynote (a developer conference) that Xamarin would be integrated into Visual Studio.
This was great news for mobile app developers. It meant you no longer needed to pay for each Xamarin account you needed to develop in each platform. If you already used Microsoft's Visual Studio, Xamarin was included, while some versions of Xamarin can be used without needing Visual Studio, too.
Is Xamarin the best choice for mobile app development?
Xamarin isn't necessarily better, but it offers benefits for cross-platform app development. This has the potential to save on coding time, enabling developers to pass cost savings to clients.
The app development company I'm using is using Xamarin for my mobile app, Is this OK?
Xamarin is definitely a reputable choice. Ask your mobile developer why they have chosen it for your specific mobile app, and they should be able to explain without technical jargon.
Are there any alternatives to Xamarin for mobile app development?
Each mobile app requirement is different, and it's too simplistic to say that all cross-platform apps should be made using Xamarin. Alternatives include PhoneGap and Ionic, though neither of these offers the same features as Xamarin. Most notably, you do not produce the equivalent of native mobile apps in the way that you do with Xamarin.
Xamarin is not necessarily any better than anything else. As Xamarin mobile developers ourselves, we don't automatically use it. It depends on the circumstances.
If you are developing only an iOS app, or only an Android app, the cross-platform aspect of Xamarin is probably not relevant. Additionally, if a developer is experienced in either or both iOS and Android development, they will likely be able to code those apps entirely separately just as quickly.