Building Native Cross-Platform Apps
in C# with Xamarin
Greg Shackles
@gshackles
[email protected]
github.com/gshackles
speakerdeck.com/u/gshackles
Slide 2
Slide 2 text
nycmobiledev.net
@NYCMobileDev
Slide 3
Slide 3 text
gonemobile.io
@GoneMobileCast
Slide 4
Slide 4 text
What is native?
Slide 5
Slide 5 text
The Anatomy of a Native App
Native User Interfaces Native API Access Native Performance
Slide 6
Slide 6 text
The Write Once, Run Anywhere Approach
Lowest Common
Denominator
Slide 7
Slide 7 text
The Xamarin Approach
Native Apps, with
Shared Code
Slide 8
Slide 8 text
Native Performance
Xamarin.iOS does full Ahead Of Time
(AOT) compilation to produce an
ARM binary for Apple’s App Store.
Xamarin.Android takes advantage of
Just In Time (JIT) compilation on the
Android device.
Slide 9
Slide 9 text
TL;DR
Anything you can do in Objective-C, Swift, or Java
can be done in C# or F# with Xamarin
Slide 10
Slide 10 text
Always Up To Date
Same day support for all the things
Slide 11
Slide 11 text
Always Up To Date
Slide 12
Slide 12 text
Distribute Everywhere
Slide 13
Slide 13 text
Your Friends Are Invited Too
Json.NET Rx
…and many more!
Portable Class Libraries
• One assembly
• Multiple platforms
• Including:
• Xamarin.iOS
• Xamarin.Android
• Xamarin.Mac
Slide 18
Slide 18 text
The Xamarin Platform
A Whirlwind Tour
Slide 19
Slide 19 text
Development Environment
Xamarin Studio Visual Studio
Windows or Mac 2010, 2012, 2013, 2015
Slide 20
Slide 20 text
Visual Studio Integration
Slide 21
Slide 21 text
iOS Designer
Slide 22
Slide 22 text
Android Designer
Slide 23
Slide 23 text
Component Store
Slide 24
Slide 24 text
Xamarin.Forms
Traditional Xamarin Approach Xamarin.Forms
Shared UI Code
Slide 25
Slide 25 text
Xamarin.Forms: What’s Included?
• 40+ Pages, Layouts, and Controls
• Build from code or XAML
• Data Binding
• Navigation
• Animation
• Dependency Service
• Messaging Center
Xamarin.UITest
• Write UI tests in C# or F#
• iOS and Android (with shared test code)
• Run on simulator and devices
• Compatible with all apps
• Native
• Hybrid
• Xamarin