Cross Platform Development with Xamarin & Visual Studio 2013 Mark Arteaga | President | RedBit Development Brian Sherwin | Technical Evangelist | Microsoft
Meet Mark Arteaga | @MarkArteaga President @ RedBit | @RedBitDev Xamarin Premier Partner & Microsoft Partner Developer for 15+ years with focus mobile and backend systems Worked with large enterprises, startups and software companies Design & build internal enterprise and consumer facing software Microsoft MVP for 11 years Embedded Devices, Compact Framework, Windows Phone, Windows Xamarin Certified Developer (almost )
Meet Brian Sherwin | @bsherwin Technical Evangelist, Microsoft Teach and Inspire developers on Microsoft development technologies Azure, Windows and Kinect Developer for 17 years on Microsoft Platform Mobile development as far back as Windows CE Web development for online banking, healthcare, energy and education
Course Topics Cross Platform Development with Xamarin & Visual Studio 01 | Intro to Xamarin using Visual Studio 02 | iOS Development with Xamarin & Visual Studio 03 | Android Development with Xamarin & Visual Studio 04 | Code Sharing Techniques & Xamarin.Forms 05 | UI Test Automation using Xamarin.UITest
Setting Expectations Target Audience Developers Familiar with Visual Studio C# Developers Windows Developers Suggested Prerequisites/Supporting Material Windows Mac OS Windows 8.1 Visual Studio 2013 Update 2+ Xamarin 3.5+ Xamarin.iOS Xamarin.Android Android SDKs Windows Phone 8.0 & 8.1 SDK OS X XCode Android SDK For more information and details on installing see Installing and Configuring Xamarin on Mac & Installing and Configuring Xamarin on Windows
Join the MVA Community! Microsoft Virtual Academy Free online learning tailored for IT Pros and Developers Over 2M registered users Up-to-date, relevant training on variety of Microsoft products
02 | iOS Development with Xamarin & Visual Studio Mark Arteaga | President | RedBit Development Brian Sherwin | Technical Evangelist | Microsoft
Module Overview How Xamarin.iOS Works iOS App Lifecycle & Structure Using UITableViews Using Storyboards Using MapKit
How Xamarin.iOS Works
What is Xamarin C# Xamarin
Build + Execution Model Features Code runs as 100% native app “Ahead of Time” (AOT) Compiling Generic Classes from NSObject Some Limitations Dynamic Code Generation Cannot use Reflection.Emit No Remoting More Info http://bit.ly/ZjzENy
iOS Runtime Model iOS App Native Code Mono Runtime .NET BCL Native APIs MapKit UIViewController HealthKit Etc.
iOS Application Lifecycle & Structure
Not Running Foreground Inactive Active Background Backgrounded Suspended Xamarin.iOS notifies us of all these states using various overrides in AppDelegate.cs
OnActivated(UIApplication) AppDelegate.cs State Method Not Running OnActivated(UIApplication) Active OnResignActivation Inactive DidEnterBackground Backgrounded WillEnterForeground Suspended WillTerminate
Views AppDelegate.cs ViewController.cs Storyboard AppDelegate UIViewController Storyboard
Model-View-Controller (MVC) Updates UI Changes Model View Controller User Sees Changes Performs Action
Application Properties, Lifecycle & Structure – Heritage Properties
Using UITableView
UITableViewDataSource Parts of a TableView UITableViewSource UITableViewDataSource UITableViewDelegate Data UITableViewCell
Loading Data in TableView – Heritage Properties
Using Storyboard & Navigation
Storyboards & Segues
Navigating to a Details View – Heritage Properties
Using MapKit
iOS Maps - MapKit
// in ViewDidLoad you can do the following var map = new MKMapView (UIScreen.MainScreen.Bounds); View = map;
// add a pin – called Annotation map.AddAnnotation (new MKPointAnnotation (){ Title=“My Pin", Coordinate = new CLLocationCoordinate2D (-79.71332, 43.39523) });
Loading Data in Map View – Heritage Properties
Module Recap How Xamarin.iOS Works iOS App Lifecycle & Structure Using UITableViews Using Storyboards Using MapKit