Reputation: 3
Our team would like to develop an application in Visual studio and Xamarin. The app needs to be supported in both Mac and Windows. We prefer Xamarin because the back end code can be shared. If possible, how to build and publish it so that it can be only installed in the machines. We are not planning to submit this app to the corresponding app stores.
Upvotes: 0
Views: 499
Reputation: 1080
You can write and Windows Application with C# using WinForms, WPF, WinRT (Windows Store apps). Also you can write Mac application with C# using Xamarin.Mac.
To share the code between Windows App and Mac App, you just need to split your code into shareable Business Logic (part) and specific UI part. To share the code, just use PCL libraries.
Upvotes: 1
Reputation: 2159
Yes.
The core business logic can be written in shared code usable on both platforms.
You have a couple of choices of how to develop the UI. You can use native or Xamarin Forms.
If you use native then I would suggest using the MVVM pattern with a framework like MvvmCross. You can then write the bulk of your app in shared code and just write the UI in platform-specific code, with the windows UI written as a standard windows WPF or UWP app, and the Mac app written using Xamarin.Mac using the native Mac API.
If you want to use Forms then you may have to compile the binaries yourself to get Mac support as it won't be available till roughly May 2017, but you could get started building a Forms app for UWP/Windows now and add the Mac project once it is available.
Upvotes: 0