Chapter 3. Code Sharing between iOS and Android

Xamarin's tools promise to share a good portion of your code between iOS and Android while taking advantage of the native APIs on each platform where possible. Doing so is an exercise in software engineering more than a programming skill or having the knowledge of each platform. To architect a Xamarin application to enable code sharing, it is a must to separate your application into distinct layers. We'll cover the basics of this in this chapter as well as specific options to consider in certain situations.

In this chapter, we will cover:

  • The MVVM design pattern for code sharing
  • Project and solution organization strategies
  • Portable Class Libraries (PCLs)
  • Preprocessor statements for platform-specific code ...

Get Xamarin Cross-platform Application Development - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.