Preface

Mobile applications have revolutionized the way we communicate and interact with each other, and their development is now beginning to reach a certain level of maturity. To support the development of mobile apps, there are now many tools and environments available.

Xamarin is a toolset that has seen increasing success in recent years and is gaining more and more interest, particularly from development shops that have a significant investment in .NET and C# resources. Xamarin wraps each platform's native APIs with a C# wrapper, allowing the developer to interact with the environment in essentially the same way as any native developer would. As Xamarin apps are developed in C#, a whole new possibility of sharing code across platforms comes into play with all the associated benefits and challenges.

As companies look to adopt Xamarin, new Xamarin developers will be required; where do they come from? In many cases, there will be existing seasoned mobile developers who are already familiar with Android and iOS development.

That's where this book comes in; the idea being to provide a quick path for developers already familiar with Android and/or iOS development so they can get up to speed with Xamarin development. To that end, this book does not focus on the basics of developing Android and iOS apps; rather, we focus on teaching experienced Android and iOS developers how to develop apps using Mono, C#, and the Xamarin suite of tools. Specifically, we focus on the following topics:

  • Architecture: This explains how the Xamarin products allow the use of Mono and C# to develop Android and iOS apps
  • Tools: This describes the tools provided to support the development of applications
  • Code sharing: This explains the types of code that can be shared between Android and iOS apps and the issues that might arise
  • Distribution: This explains the special considerations that should be made when distributing Xamarin.Android and Xamarin.iOS apps

It should be noted that sample apps and code snippets are provided where appropriate.

When I first started using C# to develop iOS apps, it just felt a little strange. I was no fan of Objective-C, but when did C# become the cross-platform tool of choice? I always had a lot of respect for what the Mono team accomplished, but I generally had the view that Microsoft would eventually prohibit C# and .NET from being terribly successful on any platform that they did not own. Being a Star Wars fan, and somewhat of a geek, I was reminded of a conversation from Episode III. If you recall a certain scene between Anakin and Palpatine, where Anakin realizes Palpatine knew the dark side of the force; just replace the dark side of the force with Xamarin and you get Palpatine turning to you saying: "Xamarin is a pathway to many abilities some consider to be unnatural." That's pretty much the feeling I had; was I selling out to learn a cross-platform set of technologies that would eventually completely tie me to Windows?

Two years later, I feel fairly comfortable answering that question as no! Obviously, we work in a dynamic industry and things can change in an instant, but the technology world is in a different place than it was 10 years ago, and cross-platform C# and .NET seem to play in Microsoft's favor now. So, the strange feeling has been diminished with success, and seeing how the relationship between Microsoft and Xamarin has only gone from strength to strength, I am encouraged.

If you are coming from an Objective-C or Java background, you will likely have the same feelings from time to time, but if you give the tools a chance I think you will be amazed.

I hope that you find this book a valuable resource on your path to becoming a productive mobile application developer with the Xamarin suite of products.

What this book covers

Chapter 1, Xamarin and Mono – a Pathway to the Unnatural, provides an overview of the Mono project and the suite of Mono-based commercial products offered by Xamarin.

Chapter 2, Demystifying Xamarin.iOS, describes how Mono and the iOS platform coexist and allow developers to build iOS apps using C#.

Chapter 3, Demystifying Xamarin.Android, describes how Mono and the Android platform coexist and allow developers to build Android apps using C#.

Chapter 4, Developing Your First iOS App with Xamarin.iOS, walks you through the process of creating, compiling, running, and debugging a simple iOS app.

Chapter 5, Developing Your First Android App with Xamarin.Android, walks you through the process of creating, compiling, running, and debugging a simple Android app.

Chapter 6, The Sharing Game, presents various approaches of sharing code between Xamarin.iOS and Xamarin.Android apps.

Chapter 7, Sharing with MvvmCross, walks you through the use of the Xamarin.Mobile app, which provides a cross-platform API to access location services, contacts, and the device camera.

Chapter 8, Sharing with Xamarin.Forms, walks you through the basics of using the MvvmCross framework to increase code reuse between platforms.

Chapter 9, Preparing Xamarin.iOS Apps for Distribution, discusses various methods of distributing iOS apps, and walks you through the process of preparing a Xamarin.iOS app for distribution.

Chapter 10, Preparing Xamarin.Android Apps for Distribution, discusses various methods of distributing Android apps, and walks you through the process of preparing a Xamarin.Android app for distribution.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset