Getting started with Xamarin.Native vs Xamarin.Forms/MAUI for iOS & Android

Xamarin Native was created around a decade ago as a revolutionary way to create iOS & Android apps using just the C# language alongside the native Android XML layouts & iOS drag and drop Storyboards. It blew up the scene as people didn’t need to touch Java or Objective-C in order to create apps. Xamarin Forms was conceived many years after Xamarin Native was created as a way to avoid having to deal with the native platforms complexities.

Compared to Xamarin Native, Xamarin.Forms allows you to get rid of dealing with Android XML and iOS Storyboards, and more importantly having to deal with navigation complexities on each platform, and passing data across pages.

Since Visual Studio for Mac got rid of the default Xamarin Native solution template, there is no easy way of getting started with a Xamarin Native app. Since there’s no easy way to create the template, it discourages beginners trying to get started, making it harder for companies to hire for such a role. So as a follow up to our Xamarin University article, in this tutorial we will learn how to get started by following the steps needed, so I hope it helps any one out there who’s interested in learning for an interview or expanding their Xamarin.Forms skills.

You can download the code from GitHub for the end of this video here, but it might take some steps to actually change the project and solution names to what you need. So it might make sense to follow along in this video on how I created it, while making sure to name the app for your own purpose:

It took me several tries to get the project setup properly due to tiny errors, so be patient and you’ll get there!

Important points to note:

  • If you start with the iOS project (as we did in the video), you have to ensure the “.iOS” suffix in the project name, and ensure that the solution name doesn’t have that suffix. Also ensure that “Create a project…directory” is selected as shown:
  • You can add the “.Android” or “.Droid” suffix to the Android project, either way works
  • You can add the “.Core” or “.Shared” or “.ViewModels” or “.Services” suffix to the shared .Net project, whatever you prefer.
  • For brownie points, you can go one step ahead and fix up the build configuration, which will also reduce the build times. To do this, go to the solution options, and create a new configuration for Debug and another for Release and then in “Configuration Mappings”, map the configurations correctly so that the iOS config doesn’t build the Android project and vice-versa as shown below:

The advantage of learning Xamarin Native is that if you switch to native development using Java/Swift, it will be a cakewalk as you just need to look up the language syntax, but you will know the concepts and all of the SDKs. We will also creating more tutorials to teach about Navigation and ListViews, so please subscribe here on our YouTube and Follow us to let me know what you would like to see done better/differently!

--

--

--

Developers building things, on here to share knowledge. Featured blog for PlanetXamarin.com github.com/saamerm linkedin.com/in/saamer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Machine Learning @ DKatalis: Generating Synthetic Data with Photoshop and Python For Great Good!

A journey — continuous improvement(?)

What if companies say: “help me move away from Oracle”?

Is String Objects in Java are Immutable?

An optional epiphany

Utah Lawyers

utah lawyers

How to create Azure container Instance (ACI) with Private Azure File as Mounted Volume

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
The First Prototype

The First Prototype

Developers building things, on here to share knowledge. Featured blog for PlanetXamarin.com github.com/saamerm linkedin.com/in/saamer

More from Medium

JavaScript to Xamarin.Forms Two Way Communication Setup

Convert Country Name To Flag Emoji in C# & the .NET ecosystem

How To: SVG as an iOS image asset in Xamarin!

NET5 Exception Handling Made Easy