0

I am a .NET developer. I have a complete Android app developed in Android studio. I want to develop that app in Xamarin cross platform.

Which project template should I choose to develop my app both for Android and iOS? Which one of these will be easier to develop a cross platform app?

  1. Blank App (Native Portable)
  2. Blank App (Native Shared)
  3. Blank App (Xamarin Forms Portable)
  4. Blank App (Xamarin Forms Shared)
phuclv
  • 37,963
  • 15
  • 156
  • 475
Moghees M
  • 11
  • 4
  • You have to evaluate first what exactly you want to do. Via Xamarin.Android you can port your Android app from Java to C# and use all your existing assets, while later you can develop the iOS counter part via Xamarin.iOS. Xamarin.Forms can be utilized to implement common pages for the two. So, the first step is whether you would use C#, as there are other approaches to share your Android code with a native iOS app. – Lex Li Nov 16 '16 at 10:41

1 Answers1

0

These links will help you to decide which project type you'll going to use:

https://developer.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/sharing_code_options/

https://xamarinhelp.com/portable-class-library-pcl-vs-shared-projects/

http://hotkrossbits.com/2015/05/03/xamarin-forms-pcl-vs-shared-project/

Xamarin Shared Library and PCL

http://xfcomplete.net/general/2016/01/19/pcl-or-shared-project/

Here are some aspects:

Xamarin Forms vs Native

  • Native you have to specify your Templates for each OS
  • Xamarin Forms, one Layout for all OS - But you can't use platform specific views/controls

Portable:

  • No platform specific code (it's possible to write your own lib for it, but for the most important features you will find such libraries on github or over nuget - e.g. https://github.com/XLabs/Xamarin-Forms-Labs for Controls, Camera-/Location-/..-access)

  • Easier to code Apps for multiple platforms - no need for compiler directives for code switching depending on platform

  • no need to think about what code is working on which os

  • easier to maintain and test (in my opinion, with a good design of your architecture it's not a big deal to make a shared project good maintainable and testable like an portable app)
  • Which platforms do you use? Are these supported in the PCL-libraries you need?

Shared:

  • Easier acces on platform-specific features
  • more versatile / flexible
  • Compiler directives for OS

Even though you have to decide which type will good fit with your values and needs.

I hope, I could help a little bit.

Community
  • 1
  • 1
user1519979
  • 1,854
  • 15
  • 26