Building Cross-Platform iOS/Android Apps with Xamarin, Visual Studio, and C# - Part 1

Learn how to use Xamarin to leverage your skills in Microsoft Visual Studio and C# to build cross-platform apps that run on both Android and iOS.
Course info
Rating
(774)
Level
Intermediate
Updated
Jan 15, 2014
Duration
3h 10m
Table of contents
Architecture and Setup
Creating The Android App
Preparing for iOS Development
Creating the iOS App
Creating the Shared Code Library
Cross-platform Image Management
Description
Course info
Rating
(774)
Level
Intermediate
Updated
Jan 15, 2014
Duration
3h 10m
Description

Learn how to use Xamarin to leverage your skills in Microsoft Visual Studio and C# to build cross-platform apps that run on both Android and iOS. In the first part of this course series, we show you everything you need to get started using Xamarin's integration with Visual Studio to create cross-platform C# apps. We provide detailed coverage of Xamarin along with other tools you need, their setup, architecture, and the basics of their use. We introduce the basics of creating an Android and an iOS application, creating a simple user interface, and how to test and deploy the application to emulators, simulators, and real devices all using Xamarin's cross-platform developer tools. Finally, we introduce .NETs Portable Class Library and show how to create a single class library that runs across both Android and iOS devices.

About the author
About the author

Jim Wilson is president of JW Hedgehog, Inc., a consulting firm specializing in solutions for the Android, iOS, and Microsoft platforms. Jim has over 30 years of software engineering experience, with the past 15 years heavily focused on creating mobile device and location-based solutions.

More from the author
More courses by Jim Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Architecture and Setup
Welcome to the first course in the Pluralsight series on cross-platform iOS and Android apps with Xamarin, Visual Studio and C#. In this first module, we're going to focus on the architecture and setup of our environment. My name is Jim Wilson. So in this module, we're going to cover a number of things. The first thing we're going to look at is just the overall series, what are our expectations, what you can look for from the series as a whole across all the courses and then what you expect from this first course in this series. We'll then look at what tools you need for this course, what you need to have set up and access to in order to follow along in the course. Then, we'll look at the challenge involved in bringing. NET to iOS and Android and understand what's involved there. Because we'll look at a number of things that seem fairly complicated, and when we understand what has to happen in order to bring. NET to these environments, it makes these complications a little easier to understand. When we talk about bringing. NET to Android and iOS, what do we mean by that? What is our environment actually like when we're doing that sort of thing? We'll then start looking at the tools experience. What are the tools like, and how do you work when you're developing the Android applications using C# Visual Studio, and then what is the tool experience like when developing iOS applications using C# and Visual Studio. And then we'll finish up by looking at the development philosophy and how we organizer our Visual Studio solutions when we're creating an application that's got to target both iOS and Android in this environment.

Creating The Android App
Welcome to this module on Creating the Android app. My name is Jim Wilson. So, the first thing we'll look at is how to create the Android project and actually how to select which Android project to use in Visual Studio when creating our application. We'll look at what's involved in laying out the user interface. We'll then see how we have to tie the user interface to our application code, because this is something very distinctly different in the way things work in the. NET environment. We'll then look at what's involved in displaying an image within our user interface and how we then tie that to our application code.

Preparing for iOS Development
Welcome to this module on preparing for iOS development. My name is Jim Wilson. In this module, first we'll look at the iOS development experience. What's it like to develop for iOS in this environment? Then, we'll look at the iOS development installation requirements. In other words, what do you have to have? Then, we'll look at how to properly install Xamarin onto OS X. We'll talk about how Visual Studio and the Xamarin iOS server have to connect. We'll then look at how to properly configure that connectivity. And we'll finish up with just how to verify that everything is set up correctly and working as we expect.

Creating the iOS App
Welcome to this module on creating the iOS app. My name is Jim Wilson. The first thing we'll look at is how do we actually create our iOS project. We'll then look at what's involved in adding user interface designer support to the project. We'll then look at how to layout the user interface itself interactively. We then have to go into how do we actually tie that user interface that we've designed into our application code. Once we have all that working, we're then going to enhance the application by adding an image to the layout. And, finally, look at how we actually manage the images inside of our application code.

Creating the Shared Code Library
Welcome to this module on Creating the Shared Code Library. My name is Jim Wilson. So, in this module, the first thing we'll look at is creating a Portable Class Library. We'll then look at creating our basic data representation, extending that then to have data management. We'll then take our data and add cursor-like behavior, so it's easy to move through our data. We'll then take our library and connect it up first to the Android user interface. Then we'll connect it up to the iOS user interface. And then we'll look at how we can work with our library so that the user interface can reflect information about the data without making the library closely coupled to the user interface.

Cross-platform Image Management
Welcome to this module on Cross Platform Image Management. My name is Jim Wilson. In this module, we will get shared image management in iOS applications, which is a pretty straightforward thing for us to do. Then we're going to look at the Android applications, which involves some translation between image names and resource identifiers. So, we'll look at a quick-and-dirty solution for that. We're then going to look at a more generic solution that lets us use reflection to translate image names to resource identifiers. And then, finally, we'll take a look at how we can reduce the overhead of reflection by putting some caching in place to make our applications more efficient.