ios-slim-bindings

Generate slim iOS native bindings for .NET MAUI via Objective Sharpie.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill ios-slim-bindings-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-slim-bindings
Source: https://github.com/dotnet/maui-labs/tree/main/plugins/dotnet-maui/skills/ios-slim-bindings
Command: npx skills add https://github.com/dotnet/maui-labs --skill ios-slim-bindings-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Slim iOS bindings eliminate the pain of maintaining large, fragile binding surfaces by letting you expose only the iOS APIs you need through a thin Swift/Objective-C wrapper.

Core Features & Use Cases

  • Create iOS Native Library Interop (Slim Bindings): Build a small Swift/Objective-C wrapper that bridges a native iOS library to .NET using Native Library Interop concepts.
  • Generate C# APIs from the wrapper: Use the generated Swift header and Objective Sharpie to produce ApiDefinition.cs, then adjust attributes for correctness and async support.
  • Integrate real dependencies: Support CocoaPods, Swift Package Manager, or manual xcframework inclusion so your wrapper can call the native library reliably.
  • Update safely when SDKs change: Regenerate and diff the binding definitions while preserving your intentional attribute fixes.

Quick Start

Use the ios-slim-bindings skill to generate a Swift wrapper plus the corresponding C# ApiDefinition.cs for your iOS library using the Native Library Interop workflow.

Frequently Asked Questions about ios-slim-bindings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create iOS bindings for a .NET MAUI project using a Swift wrapper?

You can create slim iOS bindings by building a small Swift wrapper with @objc annotations, generating a Swift header, and using Objective Sharpie to produce the C# ApiDefinition.cs file for your .NET MAUI project.

What is the best way to expose a subset of iOS SDK APIs to .NET without maintaining a large binding surface?

Slim native library interop lets you expose only needed iOS SDK APIs through a thin Swift/Objective-C wrapper, eliminating the pain of maintaining large, fragile binding surfaces in your .NET project.

Does Objective Sharpie support generating async C# bindings for iOS native libraries?

Yes, after generating the ApiDefinition.cs file from your Swift header using Objective Sharpie, you can adjust the binding attributes to properly support async workflows and error handling.

Can I use CocoaPods or Swift Package Manager dependencies when building xcframework interop bindings?

Yes, your Xcode wrapper project can integrate native dependencies using CocoaPods, Swift Package Manager, or manual xcframework inclusion so your wrapper can reliably call the native library.

How do I update iOS native interop bindings safely when the native SDK changes?

You can safely update bindings by regenerating and diffing the ApiDefinition.cs definitions via Objective Sharpie while preserving your intentional C# attribute fixes and async modifications.

Why should I use a thin Swift wrapper for iOS native library interop instead of binding the entire framework?

A thin Swift wrapper limits the exposed API surface, which reduces binding fragility and maintenance overhead compared to generating C# bindings for an entire native iOS framework directly.