How can I create C# desktop application with XCode for Mac OS? - xcode

Is there any other solutions to create desktop application for Mac with C#?

If you want to use C#, you can use mono to develop WinForms applications.

Mono is what you need, either use their IDE or there also seems to be a plugin for XCode

Related

Xamarin iOS GUI

We've been developing a cross-platform app in Xamarin on Windows and now we are moving to make GUI for iOS counterpart.
If I'm understanding correctly we need to switch to Visual Studio for MAC, on a MAC machine, and continue our GUI development there.
Is it possible to develop everything on Windows and just publish an app on the MAC machine?
How do we include the logic and everything from the android app?
You can use Xamarin.Forms to develop UI for both Android and iOS.
But if its already native then you can still continue developing it in Windows.
For the build and testing you definitely need a MAC, if you don't want to use a VM then you can build it on the cloud using a https://www.macincloud.com/ or other party that uses the same service, and use a simulator on windows.
If its cross platform then I assume you're using a .NET Standard for the shared codebase. So there would be no problem using the same logic for both the Android and iOS.
It is up to you. Many apps will work by just publishing on the Mac. Of those many will have some artifacts that shouldn't be in the end version.
To simplify it is like asking whether you should publish the app without testing and fixing. In 99% no, but sometimes it may work.

Common solution for Xamarin.UWP and Xamarin.Mac

I have a quick question, it would be great if anyone can clear it out. I wanted to develop a cross-platform application for Window OS and Mac OS.
I search it out a lot and found that we can create Window app with UWP and Mac OS app with the help of Xamarin.Mac but in that case, we are having a different solution for both Windows and Mac platform. We need a common solution for both the platform.
I will really appreciate if anyone can clarify how we need to proceed with the Cross-Platform development of Windows and Mac.
The idea with xamarin is to separate UI and non UI code. You can share the non UI code between the UWP and Xamarin.Mac
Another approach is to use Xamarin.Forms which abstracts the UI code to be cross platform. The Xamarin.Forms implementation for Xamarin.Mac is stil in preview though

Is it possible to develop a desktop application, which will be supported in both Mac and Windows, using Xamarin in Visual Studio?

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.
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.
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.

Develop desktop apps using Xamarin for Windows and Mac OS?

I want to develop desktop application for Windows and Mac OS. Can I use Xamarin for this?
Yes you can, but the support for Xamarin.Forms is not available right now for Xamarin.Mac. For Xamarin.UWP it is.
While using Xamarin.Mac, it is indeed using the Mono Framework, and you can develop on Xamarin Studio. The interfaces can be created either by code or with the Interface Builder on XCode. You can have more informations here : https://developer.xamarin.com/guides/mac/getting_started/
Xamarin.Forms has UWP and OSX (alpha) support. If you need WPF and/or GTK (to support also Linux), you can use something like Xwt (used by MonoDevleop) or Eto. Both allow you to choose which toolkit to use (i.e. Gtk backends can run on both Windows and Mac, or you use always the native backend, or Wpf on Windows and Gtk on Mac, etc.)
With Xamarin/Mono you can use the GTK# wrapper that comes with it to build cross platform Windows/OSx/Nix applications.
Just be aware that the UI will look less native on Windows and OSx.

Porting C# mono from windows to mac

I wanted to know what I should and shouldn't do in code that will prevent my C# application from running on OSX Lion.
You shouldn't use anything from the Microsoft.* namespaces, no PInvoke (DllImport in C#) and UI might be problematic as well.
Further information on Mono compatibility is contained in the Mono Guide Porting Winforms Applications. Existing applications can be checked for compatibility using the Migration Analyzer tool.
For more inquiries read about Mono's App Portability

Resources