Build better adaptive apps for iPhone Duo.
DuoKit is an open-source collection of runnable SwiftUI examples for adaptive layouts, navigation, safe areas, fold-aware design, presentations, and multitasking.
Important
This first release builds with Xcode 26.6 and iOS 26.5. Examples 05, 06, and 11 use a clearly labeled simulator for iPhone Duo concepts that require the iOS 27.1 SDK. They do not claim to reproduce hardware behavior.
| # | Example | Learn |
|---|---|---|
| 01 | Adaptive Layout | Respond to available space |
| 02 | NavigationSplitView | Build list/detail interfaces |
| 03 | Adaptive Grid | Let width determine columns |
| 04 | Safe Area | Handle every inset independently |
| 05 | Fold Avoidance | Keep important UI away from a fold |
| 06 | Reserved Regions | Explore division and occlusion regions |
| 07 | Adaptive Toolbar | Use system-owned bars |
| 08 | Adaptive TabView | Use adaptive system navigation |
| 09 | Sheets & Popovers | Inspect system presentations |
| 10 | Split View Multitasking | Design for partial-screen windows |
| 11 | Multiple Displays & Scenes | Model scene availability and errors |
| 12 | DuoNotes | Study a complete adaptive sample |
- Install Xcode 26.6 or later.
- Clone this repository.
- Open
DuoKit.xcodeproj. - Select the DuoKit scheme and an iPhone or iPad simulator.
- Build and run.
The deployment target is iOS 26.0. No third-party packages, accounts, or private configuration are required.
DuoKit is an examples repository rather than a UI framework. A small registry drives the handbook-style home screen and every example owns its local state. Shared code is limited to the example page template and the explicitly simulated Duo environment.
Every example follows the same learning path: problem, live demo, recommended approach, key APIs, common mistake, test cases, source, and Apple documentation.
Apple recommends adaptable layouts, standard navigation containers, independent safe-area handling, and testing across sizes and poses. Read the official resources:
- Designing for iPhone Duo
- Prepare your app for iPhone Duo
- Strike a pose with adaptive layouts on iPhone Duo
- Raise the bar with iPhone Duo
- Leverage multiple displays and scenes on iPhone Duo
The simulated regions in this repository are teaching fixtures for contributors who do not yet have Xcode 27.1. Replace them with the native APIs before drawing conclusions about real iPhone Duo geometry.
See CONTRIBUTING.md. New examples should remain small, runnable, documented, accessible, and based on available space rather than device detection.
DuoKit is available under the MIT License.
