macOS Development with Microsoft Technologies
This section of the MSDN documentation provides resources and guidance for developers looking to integrate Microsoft technologies with the macOS platform. Explore APIs, tools, and best practices for building cross-platform applications and services.
Key Areas
1. .NET on macOS
Learn how to leverage the .NET framework and .NET Core (now just .NET) to build native and cross-platform applications for macOS. This includes:
- Developing desktop applications with .NET MAUI.
- Using C# and .NET APIs for macOS development.
- Deployment and packaging for macOS.
1.1 .NET MAUI (Multi-platform App UI)
.NET MAUI is the evolution of Xamarin.Forms, enabling you to build native mobile and desktop applications with C# and .NET from a single shared codebase. Target iOS, Android, Windows, and macOS.
Key features include:
- Single project structure.
- Native UI controls.
- Access to native platform APIs.
- Extensibility through custom renderers and handlers.
Getting Started:
dotnet workload install maui
dotnet new maui -n MyMauiApp
cd MyMauiApp
dotnet build -t:Run -f net8.0-maccatalyst
2. Visual Studio for Mac
Visual Studio for Mac is a powerful IDE for developing web, cloud, and mobile applications on macOS. It offers robust support for .NET, Xamarin, and other development stacks.
Features include:
- IntelliSense and code completion.
- Integrated debugger.
- UI designers for iOS and Android.
- Version control integration (Git).
Download the latest version from the official Visual Studio for Mac website.
3. Azure Services on macOS
Access and manage your Azure resources directly from your macOS machine. The Azure CLI and various SDKs are available for macOS.
- Azure CLI: Install and manage Azure resources from the command line.
- Azure SDKs: Use SDKs for languages like Python, Node.js, and .NET to interact with Azure services.
- VS Code: With the Azure extensions, develop and deploy to Azure from your preferred code editor.
API Reference
Explore the APIs available for macOS development using Microsoft technologies.
Core .NET APIs for macOS
These APIs are part of the .NET runtime and are available for use on macOS.
API Name | Description | Platform Support |
---|---|---|
System.IO |
Provides types that allow reading and writing to and from files and data streams. | macOS, Windows, Linux |
System.Net.Http |
Provides classes for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. | macOS, Windows, Linux |
System.Text.Json |
Provides APIs for serializing and deserializing JSON. | macOS, Windows, Linux |
Foundation (via .NET bindings) |
Core macOS framework for fundamental data types, collections, and operating system services. | macOS |
AppKit (via .NET bindings) |
Framework for building macOS graphical user interfaces. | macOS |
Platform-Specific APIs (via .NET Bindings)
When developing with .NET MAUI or other cross-platform frameworks, you often need to access platform-specific APIs. .NET MAUI provides abstractions and ways to call native macOS APIs.
- Accessing the macOS Keychain.
- Using macOS specific UI elements.
- Interacting with macOS system services.
Refer to the .NET MAUI Platform Integration documentation for detailed examples.