-->
Before you start, create (or use an existing) Xamarin.Forms project. You can only add Mac apps using Visual Studio for Mac.
Adding a macOS project to Xamarin.Forms video
Adding a Mac App
Follow these instructions to add a Mac app that will run on macOS Sierra and macOS El Capitan:
Upgrading your operating system to macOS 10.14 or later will allow Office updates to be delivered for your apps. Note that new installs of Microsoft 365 for Mac or Office 2019 for Mac will also require macOS 10.14 or later.
I'm relatively new to Hyper-V and virtualization. What I would like to know, is the best way to create a Mac OS X VM running in Windows Hyper-V host. I'm currently using a Windows 10 based desktop running Hyper-V to create a test lab. I'd like to run a Mac OS X VM in Hyper-V in my test lab. The first release of the new OS — Mac OS X Server 1.0 — used a modified version of the Mac OS GUI, but all client versions starting with Mac OS X Developer Preview 3 used a new theme known as Aqua. Aqua was a substantial departure from the Mac OS 9 interface, which had evolved with little change from that of the original Macintosh operating. DownloadMT4 for Mac OS and enjoy the full range of MetaTrader 4 advantages for Forex and CFD trading. From now, traders, who use desktop and mobile devices powered by Mac, will have full access to a set of features and instruments delivered by the ultimate Forex platform. Now, the only 'cross-platform' file system I use is ZFS, presented via CIFS by Linux running in a VM. (I'm also increasingly using BTRFS which recently seems to have crossed some threshold of stability for my use cases. For a long time I only used it experimentally and it often let me down.) I don't use ZFS for Mac OS, only ZFS on Linux.
- In Visual Studio for Mac, right-click on the existing Xamarin.Forms solution and choose Add > Add New Project...
- In the New Project window choose Mac > App > Cocoa App and press Next.
- Type an App Name (and optionally choose a different name for the Dock Item), then press Next.
- Review the configuration and press Create. These steps are shown in below:
- In the Mac project, right-click on Packages > Add Packages... to add the Xamarin.Forms NuGet. You should also update the other projects to use the same version of the Xamarin.Forms NuGet package.
- In the Mac project, right-click on References and add a reference to the Xamarin.Forms project (either Shared Project or .NET Standard library project).
- Update Main.cs to initialize the
AppDelegate
: - Update
AppDelegate
to initialize Xamarin.Forms, create a window, and load the Xamarin.Forms application (remembering to set an appropriateTitle
). If you have other dependencies that need to be initialized, do that here as well. - Double-click Main.storyboard to edit in Xcode. Select the Window and uncheck the Is Initial Controller checkbox (this is because the code above creates a window):You can edit the menu system in the storyboard to remove unwanted items.
- Finally, add any local resources (eg. image files) from the existing platform projects that are required.
- The Mac project should now run your Xamarin.Forms code on macOS!
Platformer (tobydev) Mac Os 11
Next Steps
Styling
With recent changes made to
OnPlatform
you can now target any number of platforms. That includes macOS.Note you may also double up on platforms like this:
<On Platform='iOS, macOS' ...>
.Platformer (tobydev) Mac Os Catalina
Window Size and Position
You can adjust the initial size and location of the window in the
AppDelegate
:Known Issues
This is a Preview, so you should expect that not everything is production ready. Below are a few things you may encounter as you add macOS to your projects:
Not all NuGets are ready for macOS
You may find that some of the libraries you use do not yet support macOS. In this case, you'll need to send a request to the project's maintainer to add it. Until they have support, you may need to look for alternatives.
Missing Xamarin.Forms Features
Not all Xamarin.Forms features are complete in this preview. For more information, see Platform Support macOS Status in the Xamarin.Forms GitHub repository.