First Taste of Xamarin – Andriod and iOS App in C#


Xamarin is a Microsoft-owned San Francisco, California-based software company founded in May 2011 by the engineers that created Mono, Mono for Android and MonoTouch, which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET).

With a C#-shared codebase, developers can use Xamarin tools to write native Android, iOS, and Windows apps with native user interfaces and share code (an average of 75%) across multiple platforms. Over 1 million developers were using Xamarin’s products in more than 120 countries around the world as of May 2015. On February 24, 2016, Microsoft announced it had signed a definitive agreement to acquire Xamarin. (From Wikipedia)

So Xamarin is a cross-platform solution, for using C# and .NET Framework to create native Android, iOS, and Windows apps and share most of the codes. It sounds amazing. Today I want to have a taste of Xamarin.

Android App

Firstly you need to install the Xamarin package for VS. Then you can see the Android App templates from the New Project window:

We create a blank app here. You can design your UI in design window.

And write the code in C#:

At last, run the demo in simulator:

The simulator can run smoothly, with no delays.

iOS App

It’s a bit tricky to develop iOS App. Since iOS App can only run in the simulator of Mac OS system. So I use VMWare and run a Mac OS system in it.

Then I create a new iPhone App project. You need to connect to the Mac OS system for debugging at this time:

After connecting, you can edit the user interface:

Then run the simulator in Mac OS in VMWare:


Leave a Reply

Your email address will not be published.