---
title: "Using Xamarin to build cross platform mobile apps: The dos and don’ts"
description: Processware decided to migrate its Mobile App, developed in C# for Windows Mobile, to Xamarin Forms platform.
image: https://www.processwaregroup.com/hubfs/PRO-1-1.jpg
---

[![](https://www.processwaregroup.com/hubfs/processware/logo/processware_logo.png)](https://www.processwaregroup.com/)

- [O2P](https://www.processwaregroup.com/en/the-platform)
- [About Us](https://www.processwaregroup.com/en/about-us)
- [Solutions](https://www.processwaregroup.com/en/solutions)
- [Industries](https://www.processwaregroup.com/en/industries)
- [Stories](https://www.processwaregroup.com/en/stories)
- [Partners](https://www.processwaregroup.com/en/partners)
- [Achievements](https://www.processwaregroup.com/en/achievements-and-awards-processware)

- [Visit Our Blog](https://www.processwaregroup.com/blog)
- <https://www.youtube.com/channel/UCMkhsk6rfs23BGMmrIEKwzQ?>
- <https://www.linkedin.com/company/processware>
- EN 
    - [EN](https://www.processwaregroup.com/)
    - [BR](https://www.processwaregroup.com/br)
    - [PT](https://www.processwaregroup.com/pt)
    - [ES](https://www.processwaregroup.com/es)

- [O2P](https://www.processwaregroup.com/en/the-platform)
- [About Us](https://www.processwaregroup.com/en/about-us)
- [Solutions](https://www.processwaregroup.com/en/solutions)
- [Industries](https://www.processwaregroup.com/en/industries)
- [Stories](https://www.processwaregroup.com/en/stories)
- [Partners](https://www.processwaregroup.com/en/partners)
- [Achievements](https://www.processwaregroup.com/en/achievements-and-awards-processware)
- [Visit our Blog](https://www.processwaregroup.com/blog)
- [YouTube](https://www.youtube.com/channel/UCMkhsk6rfs23BGMmrIEKwzQ?)
- [Linkedin](https://www.linkedin.com/company/processware)
- [EN](https://www.processwaregroup.com/)
- [PT](https://www.processwaregroup.com/pt)
- [BR](https://www.processwaregroup.com/br)
- [ES](https://www.processwaregroup.com/es)

# Using Xamarin to build cross platform mobile apps: The dos and don’ts

 We would like to share with you some of the lessons learned through our journey using this new technology.

 May 5, 2017 2:32:13 PM

![Luis Felipe Santos](https://www.processwaregroup.com/hs-fs/hubfs/Perfil%202-1.jpg?width=35&name=Perfil%202-1.jpg)

 Posted By [Luis Felipe Santos](https://www.processwaregroup.com/en/blog/author/luis-felipe-santos)

Processware, as we explained in [this post](https://www.processwaregroup.com/en/blog/why-using-xamarin-to-build-cross-platform-mobile-apps-is-a-good-choice), has elected Xamarin as its platform of choice for cross-platform mobile apps development. As so, we would like to share with you some of the lessons learned through our journey using this new technology.

 

Xamarin was founded in 2011, and in 2016 Microsoft announced its acquisition. Microsoft played hard: they included Xamarin into Visual Studio (including the [free edition](https://www.visualstudio.com/vs/community/)) and they [open sourced](https://github.com/xamarin) it.

One of the most appealing characteristics of using Xamarin is that regular .NET developers don’t need to step out of Visual Studio, and they benefit from all the goodies provided by the C# language like LINQ, async/await, XAML, strong types and garbage collection, just to name a few, almost removing the learning curve of targeting completely different devices (Android/iOS versus Windows Servers). 

 

With this favorable scenario and strong technological trend, Processware decided to migrate its Mobile App, developed in C# for Windows Mobile, to Xamarin Forms platform. In this journey, we learn a lot about this new technology, so we would like to share with you what to-do and not to-do with Xamarin.

 

#### Project Types

When you start developing with Xamarin, during the project creation stage, you will need to decide what kind of project will be used: PCL (Portable Class Library) or SAP (Shared Asset Project).

 

The SAP project shares code across the specific platform projects at compilation-time, and when there is a need to use a platform-specific API some runtime errors can occur since the IDE doesn’t block the access to these APIs. Therefore the team (developers and testers) need to be extremely careful during the tests.

 

On the other hand, the PCL project will generate a DLL referenced between the platform-specific projects, containing business rules and everything that is common to all platforms (including the screens), leaving the maintenance and development of the App easier and safer because it’s not possible to directly access a specific platform API.

 

So, our advice is to try to create the screens just with PCL components because when we use them you will know that these components exist, they are available and they’ll have similar behaviors across all platforms, avoiding duplicated code and exhaustive testing for each platform.

 

#### Standard Components

Xamarin comes with a lot of standard components that prevent developers to start everything from scratch. The good thing is: we can customize these components. But we need to pay attention with these customizations of standard PCL components because any change must be very well tested on ALL platforms, generating a huge amount of tests, increasing the development cycle of the App.

 

#### Platform-specific components

Whenever you need to use a component that isn’t available as a Standard Component, you are free to create a platform-specific component.

But *“with great power comes great responsibility”*: The use of platform-specific components can be dangerous because these may not be available or may not even exist on other platform(s), thus generating a divergent App behavior.

Sometimes some specific platform development may be necessary, and in this case we should avoid introducing business rules into those components because we’ll need to replicate them to each platform generating duplicate code and a maintenance nightmare.

 

#### MVVM

One of the interesting Xamarin Forms resources is the components binding using MVVM architecture. The separation of the business data from the display rules on the screen, facilitates the maintenance of both, avoiding exhaustive work of creating screens because the MVVM model leaves the code simpler, organized and short with separate responsibilities.

 

#### Device Features

Another challenge was the use of platform-specific APIs to access device hardware like GPS, camera, Bluetooth, etc.  However, with PCL project and dependency injection, and by using DependencyService (provided by Xamarin) we get access to these APIs in a safe way without taking the risk of causing a runtime error. Once it has been implemented in the platform-specific projects, and, using an interface, the code is directed to platform-specific implementation.

 

#### Deployment

One of the hurdles of developing mobile apps, especially for Android and iOS, is the deployment during the test phase. Everybody knows that, for production, you should rely on App Store or Google Play, but what about the frequent deployments during the tests? The answer is [HockeyApp](http://www.hockeyapp.com/).

[HockeyApp](http://www.hockeyapp.com/) is integrated into the Visual Studio environment, and lets you control the App distribution as well as version control, usage statistics and mainly crash reports with stack trace, that helps us a lot with debugging and patching.

 

Summarizing all this, here’s a short list with the **dos** and **don'ts** when using Xamarin Forms:

#### Dos

- Use PCL (Portable Class Library) project type
- Use native components whenever possible
- Use MVVM design pattern

#### Don’ts

- Avoid using SAP (Shared Asset Project) project
- Avoid customizing standard components
- Avoid developing platform-specific components, whenever possible
- Avoid developing business rules in platform-specific projects

** **

#### Summary

Xamarin is a great platform, where you can do rapid prototyping and development, targeting multiple devices/OSs, with native performance, using a single shared codebase which reduces the development and maintenance costs.

According to our experience, following these suggestions will make your life much easier when using Xamarin platform for mobile App development.

---

 

Share

- [Tweet](https://twitter.com/share)

Topics

[Mobile Apps](https://www.processwaregroup.com/en/blog/topic/mobile-apps) [Mobile Platforms](https://www.processwaregroup.com/en/blog/topic/mobile-platforms) [Mobile Development](https://www.processwaregroup.com/en/blog/topic/mobile-development) [Xamarin](https://www.processwaregroup.com/en/blog/topic/xamarin) 

COMMENTS - 4 Comments

[Previous ](https://www.processwaregroup.com/en/blog/automated-warehousing-how-to-prevent-operational-disruption)

[Next ](https://www.processwaregroup.com/en/blog/how-to-mitigate-integration-risks-during-operation-change-management)

### Follow Us

 We're waiting for you on LinkedIn

[ Connect with our LinkedIn ](https://www.linkedin.com/company/processware)

### Sign up for our newsletter

### Recent Posts

### Posts by Topic

- [Digital transformation (10)](https://www.processwaregroup.com/en/blog/topic/digital-transformation)
- [IoT (10)](https://www.processwaregroup.com/en/blog/topic/iot)
- [Change management (7)](https://www.processwaregroup.com/en/blog/topic/change-management)
- [Process Optimization (6)](https://www.processwaregroup.com/en/blog/topic/process-optimization)
- [Industry 4.0 (5)](https://www.processwaregroup.com/en/blog/topic/industry-4-0)
- [Digital Maturity (4)](https://www.processwaregroup.com/en/blog/topic/digital-maturity)
- [Risk mitigation (4)](https://www.processwaregroup.com/en/blog/topic/risk-mitigation)
- [Achieving results (3)](https://www.processwaregroup.com/en/blog/topic/achieving-results)
- [Operations management (3)](https://www.processwaregroup.com/en/blog/topic/operations-management)
- [Problem solving (3)](https://www.processwaregroup.com/en/blog/topic/problem-solving)
- [Strategy (3)](https://www.processwaregroup.com/en/blog/topic/strategy)
- [Continuous improvement (2)](https://www.processwaregroup.com/en/blog/topic/continuous-improvement)
- [Digital strategy (2)](https://www.processwaregroup.com/en/blog/topic/digital-strategy)
- [Dynamic MRP (2)](https://www.processwaregroup.com/en/blog/topic/dynamic-mrp)
- [Leadership (2)](https://www.processwaregroup.com/en/blog/topic/leadership)
- [Lean Manufacturing (2)](https://www.processwaregroup.com/en/blog/topic/lean-manufacturing)
- [Mobile Apps (2)](https://www.processwaregroup.com/en/blog/topic/mobile-apps)
- [Mobile Development (2)](https://www.processwaregroup.com/en/blog/topic/mobile-development)
- [Mobile Platforms (2)](https://www.processwaregroup.com/en/blog/topic/mobile-platforms)
- [Operation efficiency (2)](https://www.processwaregroup.com/en/blog/topic/operation-efficiency)
- [Organization sustainability (2)](https://www.processwaregroup.com/en/blog/topic/organization-sustainability)
- [Process automation (2)](https://www.processwaregroup.com/en/blog/topic/process-automation)
- [Process orchestration (2)](https://www.processwaregroup.com/en/blog/topic/process-orchestration)
- [Real time analytics (2)](https://www.processwaregroup.com/en/blog/topic/real-time-analytics)
- [Real time optimization (2)](https://www.processwaregroup.com/en/blog/topic/real-time-optimization)
- [Sustainability (2)](https://www.processwaregroup.com/en/blog/topic/sustainability)
- [Traceability (2)](https://www.processwaregroup.com/en/blog/topic/traceability)
- [24x7 Support (1)](https://www.processwaregroup.com/en/blog/topic/24x7-support)
- [5 Whys (1)](https://www.processwaregroup.com/en/blog/topic/5-whys)
- [Agile Model (1)](https://www.processwaregroup.com/en/blog/topic/agile-model)
- [Airline Catering (1)](https://www.processwaregroup.com/en/blog/topic/airline-catering)
- [Automated Warehouses (1)](https://www.processwaregroup.com/en/blog/topic/automated-warehouses)
- [Automated Warehousing (1)](https://www.processwaregroup.com/en/blog/topic/automated-warehousing)
- [Automated process control (1)](https://www.processwaregroup.com/en/blog/topic/automated-process-control)
- [Automation (1)](https://www.processwaregroup.com/en/blog/topic/automation)
- [Balsamic (1)](https://www.processwaregroup.com/en/blog/topic/balsamic)
- [Big data (1)](https://www.processwaregroup.com/en/blog/topic/big-data)
- [Business Agility (1)](https://www.processwaregroup.com/en/blog/topic/business-agility)
- [Business Models (1)](https://www.processwaregroup.com/en/blog/topic/business-models)
- [Capturing value (1)](https://www.processwaregroup.com/en/blog/topic/capturing-value)
- [Cause & Effect Process (1)](https://www.processwaregroup.com/en/blog/topic/cause-effect-process)
- [Collective ambition (1)](https://www.processwaregroup.com/en/blog/topic/collective-ambition)
- [Complex operation management (1)](https://www.processwaregroup.com/en/blog/topic/complex-operation-management)
- [Compliance management (1)](https://www.processwaregroup.com/en/blog/topic/compliance-management)
- [Connectivity (1)](https://www.processwaregroup.com/en/blog/topic/connectivity)
- [Corporate Sustainability (1)](https://www.processwaregroup.com/en/blog/topic/corporate-sustainability)
- [Customer Experience (1)](https://www.processwaregroup.com/en/blog/topic/customer-experience)
- [Delivery quality (1)](https://www.processwaregroup.com/en/blog/topic/delivery-quality)
- [Demand management (1)](https://www.processwaregroup.com/en/blog/topic/demand-management)
- [Divide and Conquer (1)](https://www.processwaregroup.com/en/blog/topic/divide-and-conquer)
- [Dynamic operations control (1)](https://www.processwaregroup.com/en/blog/topic/dynamic-operations-control)
- [Dynamic process control (1)](https://www.processwaregroup.com/en/blog/topic/dynamic-process-control)
- [ERP Integration (1)](https://www.processwaregroup.com/en/blog/topic/erp-integration)
- [ERP implementation (1)](https://www.processwaregroup.com/en/blog/topic/erp-implementation)
- [Effectivity (1)](https://www.processwaregroup.com/en/blog/topic/effectivity)
- [Flexibility (1)](https://www.processwaregroup.com/en/blog/topic/flexibility)
- [Gemba (1)](https://www.processwaregroup.com/en/blog/topic/gemba)
- [Global Supply Chain Planning (1)](https://www.processwaregroup.com/en/blog/topic/global-supply-chain-planning)
- [Global orchestration (1)](https://www.processwaregroup.com/en/blog/topic/global-orchestration)
- [Global strategy (1)](https://www.processwaregroup.com/en/blog/topic/global-strategy)
- [IIoT (1)](https://www.processwaregroup.com/en/blog/topic/iiot)
- [IT Quality assurance (1)](https://www.processwaregroup.com/en/blog/topic/it-quality-assurance)
- [IT Strategy (1)](https://www.processwaregroup.com/en/blog/topic/it-strategy)
- [Improve quality (1)](https://www.processwaregroup.com/en/blog/topic/improve-quality)
- [Inbound Control (1)](https://www.processwaregroup.com/en/blog/topic/inbound-control)
- [Inducing excellence (1)](https://www.processwaregroup.com/en/blog/topic/inducing-excellence)
- [Integration (1)](https://www.processwaregroup.com/en/blog/topic/integration)
- [Interoperability (1)](https://www.processwaregroup.com/en/blog/topic/interoperability)
- [Kaizen (1)](https://www.processwaregroup.com/en/blog/topic/kaizen)
- [Knowledge management (1)](https://www.processwaregroup.com/en/blog/topic/knowledge-management)
- [Leadership Skills (1)](https://www.processwaregroup.com/en/blog/topic/leadership-skills)
- [Lean (1)](https://www.processwaregroup.com/en/blog/topic/lean)
- [Lean Leadership (1)](https://www.processwaregroup.com/en/blog/topic/lean-leadership)
- [Lean Philosophy (1)](https://www.processwaregroup.com/en/blog/topic/lean-philosophy)
- [Logistics Automation (1)](https://www.processwaregroup.com/en/blog/topic/logistics-automation)
- [Manufacturing efficiency (1)](https://www.processwaregroup.com/en/blog/topic/manufacturing-efficiency)
- [Microservices (1)](https://www.processwaregroup.com/en/blog/topic/microservices)
- [Mission Critical Support (1)](https://www.processwaregroup.com/en/blog/topic/mission-critical-support)
- [Mobile (1)](https://www.processwaregroup.com/en/blog/topic/mobile)
- [Monolithic applications (1)](https://www.processwaregroup.com/en/blog/topic/monolithic-applications)
- [Operation management (1)](https://www.processwaregroup.com/en/blog/topic/operation-management)
- [Operation optimization (1)](https://www.processwaregroup.com/en/blog/topic/operation-optimization)
- [Operation orchestration (1)](https://www.processwaregroup.com/en/blog/topic/operation-orchestration)
- [Operational Efficiency (1)](https://www.processwaregroup.com/en/blog/topic/operational-efficiency)
- [Operational Processes (1)](https://www.processwaregroup.com/en/blog/topic/operational-processes)
- [Operational solution deployment (1)](https://www.processwaregroup.com/en/blog/topic/operational-solution-deployment)
- [Operational solutions (1)](https://www.processwaregroup.com/en/blog/topic/operational-solutions)
- [Organization efficiency and effictiveness (1)](https://www.processwaregroup.com/en/blog/topic/organization-efficiency-and-effictiveness)
- [People effectiveness (1)](https://www.processwaregroup.com/en/blog/topic/people-effectiveness)
- [People efficiency (1)](https://www.processwaregroup.com/en/blog/topic/people-efficiency)
- [Performance improvement (1)](https://www.processwaregroup.com/en/blog/topic/performance-improvement)
- [Predictive forecasting (1)](https://www.processwaregroup.com/en/blog/topic/predictive-forecasting)
- [Predictive operations planning (1)](https://www.processwaregroup.com/en/blog/topic/predictive-operations-planning)
- [Prevent failure (1)](https://www.processwaregroup.com/en/blog/topic/prevent-failure)
- [Process design (1)](https://www.processwaregroup.com/en/blog/topic/process-design)
- [Process management; (1)](https://www.processwaregroup.com/en/blog/topic/process-management)
- [Promoting change (1)](https://www.processwaregroup.com/en/blog/topic/promoting-change)
- [Prototyping (1)](https://www.processwaregroup.com/en/blog/topic/prototyping)
- [Quality (1)](https://www.processwaregroup.com/en/blog/topic/quality)
- [Quality assurance (1)](https://www.processwaregroup.com/en/blog/topic/quality-assurance)
- [Real time IT platform (1)](https://www.processwaregroup.com/en/blog/topic/real-time-it-platform)
- [Real time operations (1)](https://www.processwaregroup.com/en/blog/topic/real-time-operations)
- [Real time visibility (1)](https://www.processwaregroup.com/en/blog/topic/real-time-visibility)
- [Redundancy (1)](https://www.processwaregroup.com/en/blog/topic/redundancy)
- [Requirement Satisfaction (1)](https://www.processwaregroup.com/en/blog/topic/requirement-satisfaction)
- [Root Cause Analysis - RCA (1)](https://www.processwaregroup.com/en/blog/topic/root-cause-analysis-rca)
- [Six Sigma (1)](https://www.processwaregroup.com/en/blog/topic/six-sigma)
- [Software (1)](https://www.processwaregroup.com/en/blog/topic/software)
- [Software Architecture (1)](https://www.processwaregroup.com/en/blog/topic/software-architecture)
- [Software Development (1)](https://www.processwaregroup.com/en/blog/topic/software-development)
- [Solution design (1)](https://www.processwaregroup.com/en/blog/topic/solution-design)
- [Talent factory (1)](https://www.processwaregroup.com/en/blog/topic/talent-factory)
- [Talent nurturing (1)](https://www.processwaregroup.com/en/blog/topic/talent-nurturing)
- [Team effectiveness (1)](https://www.processwaregroup.com/en/blog/topic/team-effectiveness)
- [Teamwork (1)](https://www.processwaregroup.com/en/blog/topic/teamwork)
- [Technical workshops (1)](https://www.processwaregroup.com/en/blog/topic/technical-workshops)
- [Test Bench (1)](https://www.processwaregroup.com/en/blog/topic/test-bench)
- [Toyota Way (1)](https://www.processwaregroup.com/en/blog/topic/toyota-way)
- [Transport planning (1)](https://www.processwaregroup.com/en/blog/topic/transport-planning)
- [Troubleshooting (1)](https://www.processwaregroup.com/en/blog/topic/troubleshooting)
- [Value delivery (1)](https://www.processwaregroup.com/en/blog/topic/value-delivery)
- [Xamarin (1)](https://www.processwaregroup.com/en/blog/topic/xamarin)
- [technological innovation (1)](https://www.processwaregroup.com/en/blog/topic/technological-innovation)

[see all](https://www.processwaregroup.com/en/blog/using-xamarin-to-build-cross-platform-mobile-apps-the-dos-and-donts#)

Contact us

Contact us to either receive a budget or clarify any question or doubt that you may have regarding our products and solutions. We will be glad to assist you. If you want to report a complaint, please send an e-mail to complaint[at]processwaregroup.com

 ©2026 Processware. All rights reserved.

 +351 21 454 45 28  +55 12 3206 5301

Europe South America