Use existing Xamarin form project to mac OX and windows desktop application.

I created a PCL form project in Xamarin studio for mac. Which is working fine for android and IOS.
Now, I want to use this project to run on mac OX and windows desktop application with minimum changes.
Any suggestion will be very helpful.
Thanks in advance.

Best Answer

  • DaveHuntDaveHunt US ✭✭✭✭✭
    Accepted Answer

    If your business logic is completely separated from your UI (as it should be), then it is possible. Add a Xamarin.Mac project to your solution, reference the business logic and create your Mac-specific UI in the Mac project.

Answers

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Xamarin.Forms does not support MacOS, so that's a non-starter. It does, however support Windows Phone, Windows Store, and UWP, so you should be able to add that platform to your project and be happy. If you have any platform-specific mix-in code, you'll obviously need to implement that for the Windows app, as well, but everything else should be the same.

  • AnkitGupta.7943AnkitGupta.7943 USMember ✭✭

    @DaveHunt Thanks for reply,
    Is there any way possible that I can share my existing Xamarin form code with mac OX and window application (even I have to create separate mac OX project in Xamarin with separate UI).
    I just want to centralize code so, any changes in that reflect in every place.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭
    Accepted Answer

    If your business logic is completely separated from your UI (as it should be), then it is possible. Add a Xamarin.Mac project to your solution, reference the business logic and create your Mac-specific UI in the Mac project.

  • AnkitGupta.7943AnkitGupta.7943 USMember ✭✭

    Thanks for your reply,
    By using your help, I figured out how to share code with multiple platforms.
    A sample is also there https://github.com/xamarin/mobile-samples/tree/master/TaskyPro.

Sign In or Register to comment.