Build iOS Apps with C# and .NET using the Xamarin Tools for Visual Studio

Introduction

During this course, C# .NET developers will learn how to build iOS applications using Visual Studio and Xamarin. Topics include the basics of mobile development, storing, retrieving, and displaying data in iOS, and building a responsive, native UI using the Xamarin.iOS designer to publish an app in the App store.

Audience

This course is intended for developers with at least basic C# knowledge with 6-12 months of .NET experience. Students should own and/or have used an iOS device and be familiar with the paradigms of the platform.

Prerequisites

  Before attending this course, students should have basic knowledge of C# and six months of experience developing using .NET.

At course completion

After completing this course, participants will be able to:
 
  • Build iOS applications with C# .NET using the Xamarin tools for Visual Studio
  • Design multiscreen applications using the Storyboard designer and choose the appropriate navigation for larger applications
  • Load and visualize data including accessing REST services and local SQLite databases
  • Customize the visual presentation for collections of data using the ListView

Exams

 Xamarin Certified Mobile Professional
 Xamarin Certified Mobile Developer

Course outline

Module 1: Getting Started with Xamarin (XAM101)

By the end of this module, you will be able to choose the Xamarin approach that is right for you. You will also set up your development machine and run an app on Windows, the iOS simulator, and an Android emulator.

Lesson 1: Define the state of mobile technology today
Lesson 2: Discuss mobile app trends
Lesson 3: Identify approaches to development
Lesson 4: Discover the Xamarin Approach
Lesson 5: Set up your development environment

Module 2 : Introduction to Xamarin.iOS (IOS101)

This module takes you through the entire development process. You will create a new project in Visual Studio, code the user interface and behavior, build the project, and test it on an iPhone simulator. As you build your app, you will learn several iOS design patterns such as Model-View-Controller, protocols, and delegates.

  • Lesson 1: Introduce the development tools
  • Lesson 2: constructing the application
  • Lesson 3: Add views and behavior

Module 3: Using the Xamarin.iOS Designer (IOS102)

Use the Xamarin.iOS Storyboard Designer to design a responsive, multi-screen application.

  • Lesson 1: Create a single screen application
  • Lesson 2: Describe and use Auto Layout
  • Lesson 3: Interact with designer-defined views programmatically
  • Lesson 4: Navigate between view controllers

Module 4: TableViews in iOS (IOS110)

During this module you will learn to use the UITableView to display a collection in your Xamarin.iOS app. You will use the built-in styles to visualize your data, learn to handle item-selection events and navigate the app to a new page. Finally, you will see how to configure cell reuse to reduce memory usage and boost performance.

  • Lesson 1: Explore Table Views
  • Lesson 2: Utilize built-in cell styles
  • Lesson 3: Add selection behavior
  • Lesson 4: Implement cell reuse

Module 5: Customizing Table Views (IOS115)

During this module you will define a custom cell manually in code and graphically using the UI Designer. You will also see how to display grouped data with headers/footers that delimit each group and an index to make the groups easy to navigate.

  • Lesson 1: Customize table view cells in code
  • Lesson 2: Customize table view cells in the designer
  • Lesson 3: Group data in the table view

Module 6: Consuming REST-based Web Services (XAM150)

In this module, you will learn to consume REST-based web services with HttpClient using both the managed networking stack and the platform-specific handlers that boost performance. You will also learn some common strategies for dealing with the unique challenges that mobile devices face when communicating over the network.

  • Lesson 1: Obtain the device’s network capabilities
  • Lesson 2: Introduce REST
  • Lesson 3: Consume REST services with Xamarin

Module 7: SQLite and Mobile Data (XAM160)

During this module you will learn to identify the proper location for your database file and how to insert, update, retrieve, and delete data efficiently using asynchronous I/O calls.

  • Lesson 1: Choose a data storage strategy
  • Lesson 2: Store data locally with SQLite
  • Lesson 3: Use SQLite asynchronously

Module 8: Navigation Patterns (IOS205)

This course shows you how to implement three iOS navigation patterns: stack, tab, and master-detail. It also includes some guidelines to help you decide which pattern is appropriate for your app.

  • Lesson 1: Progress through pages of data with stack-based navigation
  • Lesson 2: Show different views of related data with tab navigation
  • Lesson 3: Display hierarchical relationships with master/detail navigation

Module 9: Backgrounding Modes and File Transfers in iOS (IOS210)

This module shows you how to register for notifications as your app transitions between the foreground and background and how to use the Finite-length Task API to ensure you have enough time to save application state.

  • Lesson 1: Understand the iOS Backgrounding Model
  • Lesson 2: Work with Finite-Length Tasks

Module 10: Editing TableViews (IOS215)This module shows you how to register for notifications as your app transitions between the foreground and background and how to use the Finite-length Task API to ensure you have enough time to save application state.

  • Lesson 1: Work with built-in editing operations
  • Lesson 2:  Add support for modern editing operations
  • Lesson 3: Integrate a search bar

Module 11: Maps and Location (IOS230)

In this module you will use MKMapView to integrate a map into your UI. You will determine the user’s location, set the view port of the map, and add annotations to the display.

  • Lesson 1: Explore iOS mapping options
  • Lesson 2: Use location data
  • Lesson 3: Adjust the viewport of the map
  • Lesson 4: Add annotations to the map

Module 12: Touch and Gestures (IOS240)In this module, you will use low-level touch events to create a multi-touch drawing application. You will also detect standard gestures to translate, rotate, and zoom an image.

  • Lesson 1: Respond to touch events
  • Lesson 2: Handle multi-touch events
  • Lesson 3: Utilize gestures

Module 13: AutoLayout in Xamarin.IOS (IOS300)This module shows you how to use Constraints and Size Classes to define a flexible UI. iOS uses your code and the runtime device’s screen properties to calculate the size and position of your views.

  • Lesson 1: Create adaptive UIs using the iOS Designer
  • Lesson 2: Create and update constraints programmatically
  • Lesson 3:  Animate constraint changes
  • Lesson 4: Use Size Classes to customize your UI for different screen sizes

Module 14: Diagnosing Memory Issues (XAM370)

In this module you will learn how memory leaks happen in managed memory even with a sophisticated garbage collector and how to discover and fix them. It then shows you several memory issues that are specific to Xamarin.iOS.

  • Lesson 1: Identify and fix memory leaks in your code
  • Lesson 2: Recognize and fix Xamarin.iOS specific memory problems
  • Lesson 3: Recognize and fix Xamarin.Android specific memory problems

Module 15: Preparing for Publishing (XAM220)Prepare your app for release through the App Store, Google Play, and Windows Marketplace.

  • Lesson 1: Getting ready to publish your app
  • Lesson 2: Understanding publishing styles
  • Lesson 3: Publishing to a store

Module 16: iOS Publishing (IOS220)Build your app and submit it to the App Store.

  • Lesson 1: Prepare an application for publishing
  • Lesson 2: Sign an application
  • Lesson 3: Publish an app to the App Store

Documentation

Microsoft Official courseware

Cursus de certification

N/A

Lab

Lab 1: Building Cross Platform Applications with Xamarin
 
  • Demonstration - Cross Platform Applications with Xamarin
  • Demonstration – View a Xamarin.Forms Project
  • Setup Validation – Validate your development environment ready

Lab 2: Create a Tip Calculator for iOS in Xamarin
 
  • Group Exercise: Create and run your first iOS application
  • Add a root view controller to the Tip Calculator
  • Create the UI for the Tip Calculator
  • Add logic to your Tip Calculator

Lab 3: Use the iOS Designer to create a multi-screen application
 
  • Create the UI for a single view application
  • Add constraints to the fireworks app
  • Add a second screen to your app and code a button to navigate to it
  • Add segues to define the navigation

Lab 4: Use a Table View, populate it with data and perform basic customizations
 
  • Add a Table View to an application
  • Populate a Table View
  • Use built-in cell styles
  • Use the accessory styles and row selection
  • Implement cell reuse

Lab 5:  Customize table cells
 
  • Customize a default table cell
  • Create a custom table view cell in code
  • Create a prototype table view cell using the designer
  • Create static cells in the designer
  • Create a grouped table with an index

Lab 6: Use, consume and communicate with REST services
 
  • Determine the network connectivity
  • Communicate with a Book Service
  • Demonstration: Leverage the native platform network stack

Lab 7: Utilize SQLite to store and access data
 
  • Determine your database file path
  • Add SQLite.Net to your projects
  • Access a SQLite database with SQLite.Net
  • Access a SQLite database using asynchronous methods

Lab 8: Lab : Implement Stack, Tab and Master/Detail navigation
 
  • Implement Stack Navigation
  • Implement Tab Navigation
  • Implement Master/Detail

Lab 9: Ensure important operations complete by allowing them to run in the background
 
  • Integrate a Finite-Length Task with the application lifecycle
  • Code a cancellable Finite-Length Task

Lab 10: Create a Table view with advanced features
 
  • Turn on editing features on a Table View
  • Committing editing operations
  • Add support for swipe-gesture edit actions
  • Add support for the "pull-to-refresh" gesture
  • Add search support to a Table View Controller

Lab 11: Create an iOS map with markers, viewports and annotations
 
  • Group Exercise: Add a map and set the properties
  • Show the device's current location
  • Changing the map's viewport with the camera
  • Add an annotation to your map

Lab 12: Implementing Automation
 
  • Group Exercise: Override touch methods
  • Drag and snap
  • Create the Xam Paint app
  • Add pan gestures
  • Add Multiple gestures to add scale and rotation

Lab 13: Create a responsive UI using Size Classes and constraints
 
  • Use Auto Layout in the Designer
  • Update Constraints Programmatically
  • Animate Constraints
  • Update your UI based on the Size Class

Lab 14: Track down and correct memory leaks in your Xamarin.Forms app
 
  • Using the Xamarin Profiler to monitor allocations
  • Finding and fixing delegate reference leaks
  • Identifying and breaking strong reference cycles
  • Watch out for peer promotions
  • Show ListView memory and performance with a custom adapter

Lab 15: Preparing for Publishing (XAM220)
 
  • Getting ready to publish your app
  • Understanding publishing styles
  • Publishing to a store

Lab 16: Implementing Automation
 
  • Configuring Automation accounts
  • Creating runbooks

Formations complémentaires

MS20483: Programming C#
MS-40540: Build Android Apps with C# and .NET using the Xamarin Tools for Visual Studio
MS-40541: Build Native Cross-Platform Mobile Applications with a Shared C# Business Logic for iOS, Android, and UWP in C# .NET with Xamarin and 40541Visual Studio
MS-40542: Build Native Cross-Platform Mobile Applications with a Shared UI for iOS, Android, and UWP in C# .NET with Xamarin.Forms