How to switch or convert from Xamarin Forms to Xamarin Native?

We have a client that wants to quickly do some proof of concept apps for Android and iOS that we can rapidly develop and then release as a beta to some of their users for testing to gauge the reaction. Obviously for quick development and deployment of the initial features it would make sense to use Xamarin Forms.

However, after the feedback, they will most likely want to add more advanced features on top of the app and a more polished UI. So the question is, if the need arises to take the app from Xamarin Forms and "port it" to full Xamarin native; what is involved in doing that?
Is it as simple as just removing all the Xamarin Forms references in the solution and just move the forms UI code out of the shared project/library and into the native mobile os projects? Or would you need to create a new solution and manually port the code over?
Note, for the project there will also most likely be some components used as well as bindings to native libraries for Android and iOS to get access to some payment processing functionality.

I ask because it seems like the solution would be to just remove the Xamarin Forms code references in the shared project, but then I was unsure because when you start a new project in Visual Studio you have the option to select 2 different project templates xamarin forms portable or native portable for your shared project. Is there a difference between those that would stop you from being able to easily make the switch?

Any insight is greatly appreciated as it will affect on how the project plan is done.

Best Answers

Answers

  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    Also on a side note: "Prototypes" almost never get thrown away. ;)

  • adamkempadamkemp USInsider, Developer Group Leader mod

    "Prototypes" almost never get thrown away.

    Mine do. :)

  • AOCT.08AOCT.08 USMember

    I'm probably using the term prototype lightly, it's probably more like a pre-release.

    Anyways, I planned on making sure that concerns were separated and having a data layer, data access layer, and following an MVVM pattern for binding to views.
    I understand that the Forms UI code will have to be thrown away. I assume this also means any custom renderers would be thrown away as well since you'd implement the functionality on the native platforms?
    Additionally, what about platform overridable functions using the dependency service; can those be re-used?

    Lastly, the question still stands about the difference between xamarin forms portable or native portable project templates in Visual Studio. @rmacias you mention redoing the platform specific code; but I should be able to keep the same projects and solution structure for the platform specific projects as well as the shared project, correct? Or will a new solution have to be created and the code files manually copied and ported over?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Lastly, the question still stands about the difference between xamarin forms portable or native portable project templates in Visual Studio.

    The difference is just that one template uses Forms and one doesn't.

  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    Mine do. :)

    You must have sane clients then! ;)

Sign In or Register to comment.