MAUIverse MAUIverse

Bringing iPhone Duo APIs to .NET MAUI

The iPhone Duo APIs are available from C#, but that doesn’t make them easy to reach from Shell or XAML. MAUI doesn’t expose all of the new settings yet, and Shell manages some of the native controls itself. Pieter Nijs fills the gap with DuoExtensions.Maui, a small playground library that wraps the native integration so you can use it from your pages. He’s upfront that it’s experimental and may be overtaken by official support.

The post covers setup first: install the NuGet preview, call UseDuoExtensions() in MauiProgram.cs, and target net10.0-ios27.1 while keeping an iOS 15 deployment minimum. He also notes that it replaces Shell’s renderer registration, which matters if you already have a custom one.

From there it looks at two areas:

  • Toolbar APIs: item axis behavior, vertical toolbars, compression, and reading the preferred toolbar edge from iOS instead of guessing from orientation, each with a XAML example and the implementation behind it
  • Hinge status and angle: an injectable IHingeService with a per-window observer, plus a clear explanation of why a global reading would be unreliable

A separate five-tab demo app is on GitHub, and Pieter asks for feedback and issues. If you’re starting to plan for the foldable, it’s a useful look at what the native APIs need from MAUI.

View Source →

← Back to Community Feed

}