Understanding Xamarin
Xamarin has developed three core products for developing cross-platform applications: Xamarin Studio, Xamarin.iOS, and Xamarin.Android. Xamarin Studio is a C# IDE, while Xamarin.iOS and Xamarin.Android are the core tooling that enable C# applications to run on iOS and Android, respectively. These tools allow developers to leverage the native libraries on iOS and Android, and are built on the Mono runtime.
Mono, an open source implementation of C# and the .NET framework, was originally developed by Novell to be used on Linux operating systems. Since iOS and Android are similarly based on Linux, Novell was able to develop MonoTouch and Mono for Android as products to target the new mobile platforms. Shortly after their release, a larger company acquired Novell, and the Mono team left to form a new company aimed primarily at mobile development. Xamarin was founded to focus on these tools for developing with C# on iOS and Android.
Getting a development machine ready for cross-platform application development can take some time. And to make matters worse, Apple and Google both have their own requirements for development on their respective platforms. If you plan on developing on Windows with Visual Studio, your setup will be a bit different than on Mac OS X. Keep in mind that iOS development on Windows requires a Mac on your local network. Let's go over what needs to be installed on your machine.
The building blocks for Xamarin development on Mac OS X are as follows:
- Xcode: Apple's core IDE for developing iOS and Mac applications in Objective-C
- The Mono runtime for Mac: This is required for compiling and running C# programs on OS X
- Java: This is the core runtime for running Java applications on OS X
- Android SDK: This contains Google's standard SDK, device drivers, and emulators for native Android development
- Xamarin.iOS: This is Xamarin's core product for iOS development
- Xamarin.Android: This is Xamarin's core product for Android development
The required software for Xamarin development on Windows are as follows:
- Visual Studio or Xamarin Studio: Either IDE will work for Xamarin development on Windows.
- .NET Framework 4.5 or later: This comes with Visual Studio or recent versions of Windows.
- Java: This is the core runtime for running Java applications on Windows.
- Android SDK: This contains Google's standard SDK, device drivers, and emulators for native Android development.
- A Mac on your local network set up for Xamarin.iOS development: Apple requires iOS development to be done on OS X as part of their licensing agreement. A Mac will need to be set up for Xamarin.iOS development as listed above.
- Xamarin for Windows: This is Xamarin's core product for Windows; it includes both Xamarin.Android and Xamarin.iOS.
Each of these will take some time to download and install. If you can access a fast Internet connection, it will help speed up the installation and setup process. With everything ready to go, let's move ahead step by step and, hopefully, we can skip a few dead ends you might otherwise run into.