Building Native Cross-Platform Apps in C# with Xamarin

Building Native Cross-Platform Apps in C# with Xamarin


Greg Shackles

July 28, 2015


  1. Building Native Cross-Platform Apps in C# with Xamarin Greg Shackles

  2. @NYCMobileDev

  3. @GoneMobileCast

  4. What is native?

  5. The Anatomy of a Native App Native User Interfaces Native

    API Access Native Performance
  6. The Write Once, Run Anywhere Approach Lowest Common Denominator

  7. The Xamarin Approach Native Apps, with Shared Code

  8. 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.
  9. TL;DR Anything you can do in Objective-C, Swift, or Java

    can be done in C# or F# with Xamarin
  10. Always Up To Date Same day support for all the

  11. Always Up To Date

  12. Distribute Everywhere

  13. Your Friends Are Invited Too Json.NET Rx …and many more!

  14. Code Sharing Techniques Because sharing is caring

  15. File Linking Core Project iOS Project Core Code iOS-Specific Code

    Android Project Core Code Android-Specific Code Windows Project Core Code Windows-Specific Code File Links
  16. Shared Code Projects

  17. Portable Class Libraries • One assembly • Multiple platforms •

    Including: • Xamarin.iOS • Xamarin.Android • Xamarin.Mac
  18. The Xamarin Platform A Whirlwind Tour

  19. Development Environment Xamarin Studio Visual Studio Windows or Mac 2010,

    2012, 2013, 2015
  20. Visual Studio Integration

  21. iOS Designer

  22. Android Designer

  23. Component Store

  24. Xamarin.Forms Traditional Xamarin Approach Xamarin.Forms Shared UI Code

  25. Xamarin.Forms: What’s Included? • 40+ Pages, Layouts, and Controls •

    Build from code or XAML • Data Binding • Navigation • Animation • Dependency Service • Messaging Center
  26. Xamarin.Forms: Pages Content MasterDetail Navigation Tabbed Carousel

  27. Xamarin.Forms: Layouts Stack Absolute Relative Grid ContentView Scroll Frame

  28. Xamarin.Forms: Controls ActivityIndicator BoxView Button DatePicker Editor Entry Image Label

    ListView Map OpenGLView Picker ProgressBar SearchBar Slider Stepper TableView TimePicker WebView EntryCell ImageCell SwitchCell TextCell ViewCell …and more!
  29. First Class F# Support

  30. Razor Templating

  31. 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
  32. Test Cloud: Test on Real Devices

  33. None
  34. None
  35. None
  36. Profiler

  37. Android Player

  38. • Live online classes • Office hours • Offline access

    • Guest lectures • Certification
  39. Let’s Code

  40. Questions? Greg Shackles @gshackles