Native Swift interop bindings for Apple MusicKit
Install
| Product | Versions |
|---|---|
| .NET |
README
SwiftBindings.Apple.MusicKit
Native .NET bindings for Apple's MusicKit framework β Apple Music catalog access, library access, and playback. These are not Objective-C proxy wrappers; they use .NET 10's native Swift interop for direct, high-performance calls into Swift APIs from C#.
π Full usage guide β β authorization, subscription status, catalog search, recommendations, library editing, and playback, mapped to the generated C# surface.
Installation
dotnet add package SwiftBindings.Apple.MusicKit
Requirements
- .NET 10.0+
- iOS 26.2+, macOS 26.2+, Mac Catalyst 26.2+, tvOS 26.2+
- macOS host for development
- MusicKit capability enabled on the app and an Apple Music subscription for playback
Usage
Authorization
using MusicKit;
var status = MusicAuthorization.CurrentStatus;
if (status == MusicAuthorization.Status.NotDetermined)
{
// Prompt the user via MusicAuthorization.RequestAsync()
}
Audio variants
foreach (var variant in AudioVariantExtensions.AllCases)
{
Console.WriteLine($"{variant} β {variant.GetDescription()}");
}
var dolby = AudioVariant.DolbyAtmos.GetDescription();
MusicItemCollection<T> projects to a fully indexed C# collection (Index, FormIndex, Distance, indexed index(_:offsetBy:) are all concrete methods, not stubs).
Documentation
- Usage guide (wiki) β full C# walkthrough of the binding surface
- Apple MusicKit framework
How It Works
These bindings are auto-generated by Swift Dotnet Bindings using .NET 10's native Swift interop via the SwiftBindings SDK.
License
The bindings are MIT licensed. MusicKit is part of the Apple SDK; refer to Apple's licensing for the underlying framework.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.