How dotnet/macios works
This repository provides the .NET SDKs for building native iOS, Mac Catalyst, macOS, and tvOS applications. The user-facing path is to author a managed application against platform APIs, which bridge to Apple frameworks through the Objective-C runtime; binding generators support that API surface. The tree also includes app templates and MSBuild tasks for platform-specific build operations. The excerpts show selected runtime, Foundation, generator, and framework-binding behavior, not the full build pipeline, so unsampled subsystem links are omitted or marked unverified.
Main entry points: src Platform APIs · Runtime.cs Objective-C runtime · Generator.cs Binding generator · Templates App templates
Components 17
App authoring
- App templates
dotnet/Templates
Platform bindings
- Platform APIs
src - Foundation types
src/Foundation - UI frameworks
src/UIKit - Media frameworks
src/AVFoundation - Apple frameworks
src - Binding generator
src/bgen/Generator.cs - Binding attributes
src/bgen/AttributeManager.cs - Rgen model
src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs
Managed runtime
- Objective-C runtime
src/ObjCRuntime/Runtime.cs - Native handles
src/ObjCRuntime/NativeHandle.cs - Runtime errors
src/ObjCRuntime/ThrowHelper.cs - HTTP transport
src/Foundation/NSUrlSessionHandler.cs
Build integration
- Apple build tasks
msbuild/Xamarin.MacDev.Tasks/Tasks - Build messaging
msbuild/Messaging/Xamarin.Messaging.Build/BuildEngine.cs
Other components
- App developer
- Apple frameworks
Connections 16
- App developer → App templates: starts from
- App developer → Platform APIs: uses APIs
README.md - App templates → Platform APIs: scaffolds apps
- Platform APIs → Foundation types: uses types
src/AVKit/AVPlayerViewController.cs - Platform APIs → UI frameworks: includes UI
src/browserenginekit.cs - Platform APIs → Media frameworks: includes media
src/browserenginecore.cs - Platform APIs → Apple frameworks: includes services
- Binding generator → Binding attributes: reads attributes
src/bgen/AttributeManager.cs - Binding generator → Platform APIs: generates bindings
src/bgen/AttributeManager.cs - Rgen model → Platform APIs: models bindings
src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs - Platform APIs → Objective-C runtime: bridges calls
src/Security/AuthorizationEngine.cs - Objective-C runtime → Native handles: constructs wrappers
src/ObjCRuntime/Runtime.cs - Objective-C runtime → Runtime errors: raises errors
src/ObjCRuntime/ThrowHelper.cs - Foundation types → HTTP transport: provides transport
src/Foundation/NSUrlSessionHandler.cs - HTTP transport → Apple frameworks: sends requests
- Apple build tasks → Build messaging: uses messaging