Xamarin Cross-platform Application Development

Xamarin Cross-platform Application Development
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Write native iOS and Android applications with Xamarin
  • Add native functionality to your apps such as push notifications, camera, and GPS location
  • Learn various strategies for cross-platform development

Book Details

Language : English
Paperback : 262 pages [ 235mm x 191mm ]
Release Date : February 2014
ISBN : 1849698465
ISBN 13 : 9781849698467
Author(s) : Jonathan Peppers
Topics and Technologies : All Books, Application Development, Mobile Application Development

Table of Contents

Chapter 1: Xamarin Setup
Chapter 2: Hello Platforms!
Chapter 3: Code Sharing Between iOS and Android
Chapter 4: XamChat – a Cross-platform App
Chapter 5: XamChat for iOS
Chapter 6: XamChat for Android
Chapter 7: Deploying and Testing on Devices
Chapter 8: Web Services with Push Notifications
Chapter 9: Third-party Libraries
Chapter 10: Contacts, Camera, and Location
Chapter 11: App Store Submission
  • Chapter 1: Xamarin Setup
    • The Xamarin tools
    • Installing Xcode
    • Installing Xamarin
    • Setting up the Android emulator
    • Enrolling in the iOS Developer Program
    • Registering as a Google Play developer
    • Summary
  • Chapter 2: Hello Platforms!
    • Building your first iOS application
    • Understanding Apple's MVC pattern
    • Using Xcode and storyboards
    • Building your first Android application
    • Android activities
    • Xamarin's Android designer
    • Summary
  • Chapter 3: Code Sharing Between iOS and Android
    • Learning the MVVM design pattern
    • Comparing project organization strategies
    • Working with portable class libraries
    • Using preprocessor statements
    • Simplifying dependency injection
    • Implementing Inversion of Control
    • Summary
  • Chapter 4: XamChat – a Cross-platform App
    • Describing our sample application concept
    • Developing our model layer
    • Writing a mock web service
    • Writing the ViewModel layer
      • Implementing our LoginViewModel class
      • Implementing our RegisterViewModel class
      • Implementing our FriendViewModel class
      • Implementing our MessageViewModel class
    • Writing unit tests
      • Setting up a new project for unit tests
      • Writing assertions
    • Summary
  • Chapter 5: XamChat for iOS
    • Understanding the basics of an iOS app
    • Using UINavigationController
    • Implementing the login screen
    • Using segues and UITableView
    • Adding a friends list screen
    • Adding a list of messages
    • Composing messages
    • Summary
  • Chapter 6: XamChat for Android
    • Introducing Android Manifest
    • Adding a login screen
    • Using ListView and BaseAdapter
    • Implementing the friends list
    • Composing messages
    • Summary
  • Chapter 8: Web Services with Push Notifications
    • Learning Windows Azure
    • Setting up your Azure account
    • Exploring Azure Mobile Services
    • Creating tables and scripts
    • Adding a backend to XamChat
      • Updating the data types for Azure Mobile Services
      • Adding the Xamarin component
    • Using the Apple Push Notification Service
      • Setting up proper provisioning
      • Setting up your provisioning profile
      • Setting up a certificate signing request
      • Making client-side changes for push notifications
    • Implementing Google Cloud Messaging
    • Summary
  • Chapter 10: Contacts, Camera, and Location
    • Introducing Xamarin.Mobile
    • Accessing contacts
      • Retrieving contacts on Android
    • Looking up GPS location
      • Implementing GPS location on Android
    • Accessing the photo library and camera
      • Accessing photos on Android
    • Summary
  • Chapter 11: App Store Submission
    • Following the iOS App Store Review Guidelines
    • Submitting an app to the iOS App Store
      • Creating a distribution provisioning profile
      • Adding your app to iTunes Connect
      • Making an iOS binary for the App Store
    • Signing your Android applications
    • Submitting the app to Google Play
      • Google Play Developer program policies
    • Tips for a successful mobile app
    • Summary

Jonathan Peppers

Jonathan Peppers  is a Xamarin MVP and the lead developer of the popular cross-platform game, Draw a Stickman: EPIC. Jon works for Hitcents, a software development company based in Bowling Green, Kentucky. He has been working with the C# programming language for over 7 years. He has also been working with technologies such as WinForms, WPF, ASP.NET WebForms, and ASP.NET MVC. In recent years, Hitcents has been heavily investing in mobile development with Xamarin and has developed nearly 40 mobile applications across multiple platforms.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 3 submitted: last submission 23 Jul 2014

Chapter 2    Errata Type: Code


Page: 35

text.Text = string.Format("Count: ", ++count); should be text.Text = string.Format("Count: {0}", ++ count);

Page 36: Step no 4

Resource.Layouts.Second should be Resource.Layout.Second

Page 36: Step no 5

Open SecondActivity.cs should be Open MainActivity.cs


Chapter 3:

Page 41:

new Product { Id = 1, Name = "Shoes", Price = 19.99m },

new Product { Id = 2, Name = "Shirt", Price = 15.99m },

new Product { Id = 3, Name = "Hat", Price = 9.99m },

should be

new Product { Id = 1, Name = "Shoes", Price = 19.99f },

new Product { Id = 2, Name = "Shirt", Price = 15.99f },

new Product { Id = 3, Name = "Hat", Price = 9.99f },


Chapter 4:

Page: 62

new User { Id = 2, Username = "bobama" }, should be new User { Id = 1, Username = "bobama" }, 


Chapter 5:

Page 90:

public override void ViewWillAppear()
    loginViewModel.IsBusyChanged += OnIsBusyChanged;
should be
public override void ViewWillAppear(bool animated)
    loginViewModel.IsBusyChanged += OnIsBusyChanged;
Page 95:
public async override void ViewWillAppear()
base.ViewWillAppear ();
should be 
public async override void ViewWillAppear(bool animated)
base.ViewWillAppear (animated);

Page No. 147

Chapter No. 7

Type: Code


Instead of:
public override void ViewDidLoad()
  MyStatic.MyEvent += (sender, e) =>
    //Do something


It should be:

public override void ViewDidLoad()
  MyStatic.MyEvent -= (sender, e) =>
    //Do something


Page No. 114

Chapter No. 6

Type: Code

Instead of:

We also implemented IsBusyChanged , and displayed a simple ProgressBar function

It should be:

We also implemented IsBusyChanged , and displayed a simple ProgressDialog function

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Xamarin Cross-platform Application Development +    PhoneGap 3.x Mobile Application Development Hotshot =
50% Off
the second eBook
Price for both: $41.55

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Familiarize yourself with Apple’s MVC design pattern
  • Understand the Android activity lifecycle
  • Share C# code across platforms
  • Implement a web service with Azure Mobile Services
  • Deploy and debug your application on mobile devices
  • Call native Objective-C or Java libraries from C#
  • Use Xamarin.Mobile for camera, contacts, and location
  • Submit your app to the Apple App Store and Google Play

In Detail

Developing a mobile application for just one platform is becoming a thing of the past. Companies expect their apps to be supported on both iOS and Android, whilst leveraging the best native features of both. Xamarin’s tools help solve this requirement by giving developers a single toolset to target both platforms.

"Xamarin Cross-platform Application Development" is a step-by-step guide for building professional applications for iOS and Android. The book walks you through building a chat application, complete with a backend web service and native features such as GPS location, camera, and push notifications.

This book begins with iOS and Android application fundamentals, then moves on to sharing code, and eventually digs deeper into native functionality. By the end of the book, readers will have successfully built a cross-platform application ready for submitting to app stores. You will gain an in-depth knowledge about the concepts of building cross platform applications.

"Xamarin Cross-platform Application Development" also covers native iOS and Android APIs, unit testing, building a real web service with Windows Azure, push notifications, interacting with the camera and GPS, leveraging Java and Objective-C libraries, and finally app store submission. Towards the end of the book you will feel confident in developing your own Xamarin applications.

"Xamarin Cross-platform Application Development" will teach you everything you need to know to develop an end-to-end, cross-platform solution with Xamarin.


"Xamarin Cross-platform Application Development" is an end-to-end walk-through tutorial on developing applications for both iOS and Android. It offers clear and detailed explanations of each stage in the process, making it easier for you to master the creation of stable, production-ready, cross-platform apps.

Who this book is for

This book is for C# developers who are interested in mobile application development. If you have experience with desktop or web applications, this book will serve as a great tool to give you a head start with cross-platform development.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software