Xamarin:Cross-Platform Mobile Application Development
上QQ阅读APP看书,第一时间看更新

Preface

Xamarin has built three core products for developing iOS and Android applications in C#: Xamarin Studio, Xamarin.iOS, and Xamarin.Android. Xamarin gives you direct access to the native APIs on each platform and the flexibility to share C#code between platforms. Using Xamarin and C#, you get better productivity when compared to Java or Objective-C, and still retain great performance compared to an HTML or a JavaScript solution.

What this learning path covers

Module 1, Xamarin Cross-Platform Application Development, this module is a step-by-step guide to building real-world applications for iOS and Android. The module walks you through building a chat application, complete with a backend web service and native features such as GPS location, camera, and push notifications. Additionally, you'll learn how to use external libraries with Xamarin and Xamarin.Forms to create shared user interfaces and make app-store-ready applications. This Module has been updated with new screenshots and detailed steps to provide you with a holistic overview of the new features incorporated in Xamarin 3. By the end of the module, you will have gained expertise to build on the concepts learned and effectively develop a market-ready cross-platform application.

Module 2, Xamarin Cross-Platform Development Cookbook, this module provides recipes on how to create an architecture that will be maintainable, extendable, use Xamarin Forms plugins to boost productivity, customize your views per platforms, and use platform-specific implementations at runtime. We start with a simple creation of a Xamarin Forms solution with the three major platforms. We will then jump to XAML recipes and you will learn how to create a tabbed application page, and customize the style and behavior of views for each platform.

Moving on, you will acquire more advanced knowledge and techniques while implementing views and pages for each platform and also calling native UI screens such as the native camera page. Further on, we demonstrate the power of architecting a cross-platform solution and how to share code between platforms, create abstractions, and inject platform-specific implementations. Next, you will utilize and access hardware features that vary from platform to platform with cross-platform techniques. Well then show you the power of databinding offered by Xamarin Forms and how you can create bindable models and use them in XAML. You will learn how to handle user interactions with the device and take actions in particular events. With all the work done and your application ready, you will master the steps of getting the app ready and publishing it in the app store.

Module 3, Mastering Cross-Platform Development with Xamarin, this module starts with general topics such as memory management, asynchronous programming, local storage, and networking, and later moves onto platform-specific features. During this transition, you will learn about key tools to leverage the patterns described, as well as advanced implementation strategies and features. The module also presents User Interface design and implementation concepts on Android and iOS platforms from a Xamarin and cross-platform perspective, with the goal to create a consistent but native UI experience. Finally, we show you the toolset for application lifecycle management to help you prepare the development pipeline to manage and see cross-platform projects through to public or private release.

What you need for this learning path

Module 1:

For this module, you will need a Mac computer running at least OS X 10.7 Lion. Apple requires iOS applications to be compiled on a Mac, so Xamarin does as well. You will also need a license of the business edition of Xamarin.Android and Xamarin.iOS. A free 30-day trial is also available. You can also try the free starter edition of Xamarin, but some of the more advanced examples will not work with this module. You can visit http://xamarin.com/download to download the appropriate software.

Module 2:

On Mac:

  • Xamarin Studio 5.10.1 (build 6)
  • The latest iOS SDK (Currently in version 9.2)
  • Xcode 7.1
  • OS X 10.10.5+ (Yosemite) or 10.11 (El Capitan)

On Windows:

  • Any non-Express edition of Visual Studio 2012
  • Visual Studio 2013
  • Visual Studio 2015 (Community, Professional, and Enterprise)
  • Visual Studio Extensions for iOS and Android

All examples will work with the Free Trial evaluation or Xamarin Starter licenses. Xamarin Starter is installed by default with Visual Studio 2015 and works with VS 2012, 2013, and 2015 (including Community editions).

Module 3:

In order to build the sample project and make use of the code samples in this module, you will need a Xamarin.iOS and/or Xamarin.Android subscription, depending on the platform you want to target. Most of the diagnostic tools used are distributed as part of the development SDKs for the target platforms. As a development IDE, you will need Visual Studio 2013 (or higher) or Xamarin Studio if you are using or configuring a Windows based development environment, but only Xamarin Studio otherwise. For testing and diagnostics, real mobile devices or SDK-provided emulators can be used.

Who this learning path is for

This learning path is for developers who are already familiar with C# and want to start doing mobile development with Xamarin. If you have worked in ASP.NET, WPF, WinRT, or Windows Phone, then you will be right at home using this learning path to develop native iOS and Android applications. No previous experience with Xamarin is required. To develop cross-platform apps effectively and efficiently, this learning path is the right choice for you. The path is ideal for those who want to take their novice or intermediate-level Xamarin mobile development skills to the next level to become the go-to person within their organization. To fully understand the patterns and concepts described, you should possess a reasonable level of knowledge and an understanding of the core elements of cross-platform application development with Xamarin.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this course—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the course's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a course, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt course, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this course from your account at http://www.packtpub.com. If you purchased this course elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the course in the Search box.
  5. Select the course for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this course from.
  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the course's webpage at the Packt Publishing website. This page can be accessed by entering the course's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the course is also hosted on GitHub at https://github.com/PacktPublishing/Xamarin-Cross-Platform-Mobile-Application-Development. We also have other code bundles from our rich catalog of books, courses and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our courses—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this course. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your course, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the course in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this course, you can contact us at , and we will do our best to address the problem.