Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does it mean for Xamarin to share an average of 80-90 percent of the code across platforms?

I have been looking into Xamarin for mobile app development because it allows one code to be used for both Android and IOS. Microsoft says that "In most cases, 80% of application code is sharable using Xamarin."

So my questions are:

  1. What does that mean exactly? why only 80%?
  2. What is not sharable using Xamarin?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Things that are platform agnostic – models, data, services, etc – can be put in a pure .NET library and shared between projects.

If you use Xamarin Forms, then you can also share UI code between platforms. If you are not using XF then the UI for each platform will not be shared.

Finally, platform specific features – camera, GPS, push notifications, backgrounding, etc – will need to be per-platform. However, in many cases there are libraries or nuget packages that will provide a common API between platforms that you can use in your shared code.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading