What is Xamarin ?
Before we start with the understanding of Xamarin, we should know-
- HTML/ XML Familiarity
- A little knowledge of .NET and C#
- For the Hands-On, we’ll need a mobile device or a good performance GPU, for creating virtual Device(s)
Introduction of Xamarin | What is Xamarin?
Before getting to what is Xamarin, let me share a little history of Xamarin. It was founded in 2011 May, by the engineers who created Mono (Xamarin.Android-> Formerly Mono for Android). Since 2-16 February 04, Xamarin is owned by Microsoft.
Xamarin is an open-source, free, and cross-platform application development platform to build Android and Windows Applications. So with just a C# Code, one can easily write an actual native Android & iOS Applications.
Why should we use Xamarin?
According to Microsoft Documentation:
- It is a base framework made on top of .NET to access native features of different OS
- Beautiful frontend designed in XAML (Extensible Application Markup Language)
- Availability of platform-specific libraries
- Perform a full ahead-of-time (AOT) compilation on apps to reduce startup time, increase memory sharing, and improve performance.
- One-Stop solution for a cross-platform application development
What are the software prerequisites for getting started?
- Visual Studio Community Edition Download Here:
- Xamarin Workload in Visual Studio [For Steps Refer to this]
Now let’s build a Hello- World! Application
- Start Visual Studio (in my case present build: vs2019)
- Click on Create New Project
- Search for "Xamarin" in the Search box on top and then select "Mobile App (Xamarin.Forms)"
- Let’s give our App a Name
- Select a Blank App Template.
- In Xamarin.Forms App, the Shared Code resides under, [AppName]-> xaml.
- Currently, I'll be running a UWP (Universal Windows Platform) run to test the App, though in the End there are some Android Screenshots too...
- Let's make a little change in the XAML file (the Front End UI)
- Let's run the App by Clicking on theLocal Machine Button, make sure to select the [AppName].UWP from the Startup Project.
- Change the Label text to "Hello World, This is my First Xamarin App!!!"
- Now Let's Run the App Again
- Hurrah!! We've successfully created our First Xamarin Mobile App...
- Note: For Xamarin for Mac Users, if we want to deploy your Application to Apple iPhone, then we`ll need a Mac Device for Development...
Android App ScreenShot-
In this article, we have learned about:
- Creating our first application “HelloWorld” in Xamarin